Skip to content

Commit

Permalink
doc updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
sonus21 committed May 27, 2023
1 parent 457a0ea commit 958546d
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
7 changes: 7 additions & 0 deletions docs/message-handling/producer-consumer.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,13 @@ supported configurations.
instances when large number of messages are scheduled to be run in next 5 minutes. In such cases
Rqueue can pull message from scheduled queue to normal queue at higher rate. By default, it copies
100 messages from scheduled/processing queue to normal queue.
* `rqueue.scheduler.max.message.mover.delay=60000` Rqueue continuously move scheduled messages from
processing/scheduled queue to normal queue so that we can process them asap. Due to failure, it
can load the Redis system, in such cases it uses exponential backoff to limit the damage. This
time indicates maximum time for which it should wait before making Redis calls.
* `rqueue.scheduler.min.message.mover.delay=200` Rqueue continuously move scheduled messages from
processing/scheduled queue to normal queue so that we can process them asap. It periodically
fetches the messages, the minium delay in such cases can be configured using this variable.

### Dead Letter Queue Consumer/Listener

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ public class RqueueSchedulerConfig {
@Value("${rqueue.scheduler.scheduled.message.time.interval:2000}")
private long scheduledMessageTimeIntervalInMilli;

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

// Maximum delay for message mover task due to failure
Expand All @@ -80,6 +81,7 @@ public class RqueueSchedulerConfig {
@Value("${rqueue.scheduler.min.message.mover.delay:100}")
private long minMessageMoverDelay;

// Maximum number of messages that should be copied from scheduled to normal queue
@Value("${rqueue.scheduler.max.message.count:100}")
private long maxMessageCount;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,14 +263,14 @@
{
"sourceType" : "com.github.sonus21.rqueue.config.RqueueSchedulerConfig",
"name" : "rqueue.scheduler.redis.enabled",
"description" : "Scheduler Should auto start or not",
"description" : "Scheduler Should use redis PUB/SUB",
"type" : "java.lang.Boolean",
"defaultValue" : true
},
{
"sourceType" : "com.github.sonus21.rqueue.config.RqueueSchedulerConfig",
"name" : "rqueue.scheduler.scheduled.message.thread.pool.size",
"description" : "Number of threads should be used to pull scheduled message to original queue",
"description" : "Number of threads that will be used to pull scheduled message to normal queue",
"type" : "java.lang.Integer",
"defaultValue" : 3
},
Expand All @@ -295,6 +295,28 @@
"type" : "java.lang.Long",
"defaultValue" : 5000
},
{
"sourceType" : "com.github.sonus21.rqueue.config.RqueueSchedulerConfig",
"name" : "rqueue.scheduler.termination.wait.time",
"description" : "How long the application would wait for task termination",
"type" : "java.lang.Long",
"defaultValue" : 200
},

{
"sourceType" : "com.github.sonus21.rqueue.config.RqueueSchedulerConfig",
"name" : "rqueue.scheduler.max.message.mover.delay",
"description" : "Maximum delay for message mover task due to failure",
"type" : "java.lang.Long",
"defaultValue" : 60000
},
{
"sourceType" : "com.github.sonus21.rqueue.config.RqueueSchedulerConfig",
"name" : "rqueue.scheduler.min.message.mover.delay",
"description" : "Minimum amount of time between two consecutive message move calls",
"type" : "java.lang.Long",
"defaultValue" : 100
},
{
"sourceType" : "com.github.sonus21.rqueue.config.RqueueWebConfig",
"name" : "rqueue.web.enable",
Expand Down

0 comments on commit 958546d

Please sign in to comment.