You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2022/05/30 23:58:07 UTC

[GitHub] [activemq] stolsvik opened a new pull request, #843: AMQ-8617: RedeliveryPolicy:Exponential Backoff + NonBlockingRedelivery = too long delays

stolsvik opened a new pull request, #843:
URL: https://github.com/apache/activemq/pull/843

   Scenario on client:
   
   1. Employing RedeliveryPolicy with exponential backoff (keeping maximum
   redeliveries at default 6)
   2. Enabled non-blocking redelivery
   3. Receiving e.g. 100 consecutive poison messages (which eventually
   should DLQ after max redeliveries)
   
   This will result in massive redelivery delays due to a logic bug.
   
   The reason is that redeliveryDelay is a field variable kept on the
   ActiveMQMessageConsumer, instead of being a property on the message - or
   that the redelivery delay was calculated per message based on the
   redelivery count.
   
   When consecutive messages rollbacks multiple times, the redeliveryDelay
   field is continuously multiplied by the backoff multiplier, resulting in
   enormous delays.
   
   Fix: Ditch the field variable, instead calculating the redeliveryDelay
   per delivery from the redelivery count. (This happens to be identical to
   how it is done in afterRollback() in ActiveMQSession:1004.)
   
   Test is added - which fails with the previous code, and passes with
   this. Added a debug log line for the calculated delay.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [activemq] jbonofre merged pull request #843: AMQ-8617: RedeliveryPolicy:Exponential Backoff + NonBlockingRedelivery = too long delays

Posted by GitBox <gi...@apache.org>.
jbonofre merged PR #843:
URL: https://github.com/apache/activemq/pull/843


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org