Skip to content

Commit c3d69a4

Browse files
sonus21Sonu Kumar
and
Sonu Kumar
authored
fix 193 in 2.x train (#195)
* fix 193 in 2.12 train * add a warning log for not running tasks * wip * Use hybrid combination of Redis and fixed rate scheduler to avoid job multiplications. * test fixes * 25% buffer * doc updated. * 2.13.1 release --------- Co-authored-by: Sonu Kumar <sonu@git>
1 parent 7b49d2b commit c3d69a4

21 files changed

+1121
-843
lines changed

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
# [Rqueue] New and Notable Changes
22

3+
4+
### [2.13.1] - 24-June-2023
5+
### Fixes
6+
This will fix a severe bug happening due to task multiplications. This is causing more Redis resource usage Please check #[193]
7+
8+
39
### [2.13.0] - 25-Dec-2022
410
### Fixes
511
* Important fix for parallel message deletion or delete the message from message listener
612
* No threads are available, improvement on message poller
713
* Use System Zone ID for UI bottom screen
814

15+
916
### [2.12.0] - 14-Dec-2022
1017
### Fixes
1118
* Upgraded Pebble version for CVE
@@ -328,3 +335,4 @@ Fixes:
328335
[2.13.0]: https://repo1.maven.org/maven2/com/github/sonus21/rqueue-core/2.13.0-RELEASE
329336

330337
[122]: https://github.com/sonus21/rqueue/issues/122
338+
[193]: https://github.com/sonus21/rqueue/issues/193

build.gradle

+5-5
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ ext {
3131
springDataVersion = System.getenv("SPRING_DATA_VERSION")
3232
microMeterVersion = System.getenv("MICROMETER_VERSION")
3333

34-
// springBootVersion = '2.0.6.RELEASE'
35-
// springVersion = '5.0.10.RELEASE'
36-
// springDataVersion = '2.0.6.RELEASE'
37-
// microMeterVersion = '1.1.0'
34+
springBootVersion = '2.0.6.RELEASE'
35+
springVersion = '5.0.10.RELEASE'
36+
springDataVersion = '2.0.6.RELEASE'
37+
microMeterVersion = '1.1.0'
3838

3939
// logging dependencies
4040
lombokVersion = '1.18.10'
@@ -74,7 +74,7 @@ ext {
7474

7575
subprojects {
7676
group = 'com.github.sonus21'
77-
version = '2.13.0-RELEASE'
77+
version = '2.13.1-RELEASE'
7878

7979
dependencies {
8080
// https://mvnrepository.com/artifact/org.springframework/spring-messaging

rqueue-core/src/main/java/com/github/sonus21/rqueue/config/RqueueSchedulerConfig.java

+19
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package com.github.sonus21.rqueue.config;
1818

19+
import com.github.sonus21.rqueue.utils.Constants;
1920
import lombok.Getter;
2021
import lombok.Setter;
2122
import org.springframework.beans.factory.annotation.Value;
@@ -68,8 +69,26 @@ public class RqueueSchedulerConfig {
6869
@Value("${rqueue.scheduler.scheduled.message.time.interval:2000}")
6970
private long scheduledMessageTimeIntervalInMilli;
7071

72+
// How long the application should wait for task termination
73+
@Value("${rqueue.scheduler.termination.wait.time:200}")
74+
private long terminationWaitTime;
7175

7276
// Maximum delay for message mover task due to failure
7377
@Value("${rqueue.scheduler.max.message.mover.delay:60000}")
7478
private long maxMessageMoverDelay;
79+
80+
// Minimum amount of time between two consecutive message move calls
81+
@Value("${rqueue.scheduler.min.message.mover.delay:100}")
82+
private long minMessageMoverDelay;
83+
84+
// Maximum number of messages that should be copied from scheduled to normal queue
85+
@Value("${rqueue.scheduler.max.message.count:100}")
86+
private long maxMessageCount;
87+
88+
public long minMessageMoveDelay() {
89+
if (minMessageMoverDelay <= 0) {
90+
return Constants.MIN_SCHEDULE_INTERVAL;
91+
}
92+
return minMessageMoverDelay;
93+
}
7594
}

0 commit comments

Comments
 (0)