You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by SriLavanyaPaleti <sr...@gmail.com> on 2018/05/08 05:11:35 UTC

Redelivery schedule is messed up when there are multiple messages on the queue.

We implemented a queue which should retry the messages on it when there is an
exception.
This is done through ActiveMQ(5.11.1) and Spring. The requirement is to have
the message processing parallel with the messages not being dependent on
each others retry schedule.

Issue  : When there are multiple messages are on the queue waiting for a
redelivery after enabling the concurrency, the retry interval is not
calculated properly. 

Here is an example :-
Active MQ Settings
RedeliveryCount - 3
Retry Interval - 1 sec
BackOffMultiplier - 5
concurrent = 3-5

There are 3 messages on queue waiting for  a redelivery.

Scenario 1 :- How the queue is processed with concurrency set to 1?
Message 1 - 1 second -> Message 2 - 1 second -> Message 3 - 1 second ->
Message 1 -> 5 seconds, Message 2 - 25 seconds -> Message 3 - 125 seconds ->
Message 1 - 625 seconds ...

Scenario 2:- How the queue is processed with concurrency set to 3-5?
Message 1 - 1 second -> Message 2 - 1 second -> Message 3 - 1 second ->
Message 1 -> 5 seconds, Message 3 - 5 seconds -> Message 2 - 25 seconds ->
Message 1 - 125 seconds ...

Scenario 3:- How the queue is expected to be processed with concurrency set
to 3-5?
Message 1 - 1 second -> Message 2 - 1 second -> Message 3 - 1 second ->
Message 1 -> 5 seconds, Message 2 - 5 seconds -> Message 3 - 5 seconds ->
Message 1 - 25 seconds -> Message 3 - 25 seconds ..
Scenario 3 follows the retry schedule for all the messages.
1, 5, 25.

Is this a known issue ? If not, how can i solve this ?




 





--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html