This looks like the same behavior captured in https://issues.apache.org/jira/browse/AMQ-5730, which unfortunately has been open and unworked since April 2015. I've added a comment to that story noting that you hit the same problem and adding what I found based on my searching in the source code.
Tim On Mon, May 7, 2018 at 11:14 PM, SriLavanyaPaleti < srilavanya.pal...@gmail.com> wrote: > 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, could anyone help me solve this. > > > > -- > Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User- > f2341805.html >