[ 
https://issues.apache.org/jira/browse/AMQ-8617?focusedWorklogId=776063&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-776063
 ]

ASF GitHub Bot logged work on AMQ-8617:
---------------------------------------

                Author: ASF GitHub Bot
            Created on: 30/May/22 23:58
            Start Date: 30/May/22 23:58
    Worklog Time Spent: 10m 
      Work Description: 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.




Issue Time Tracking
-------------------

            Worklog Id:     (was: 776063)
    Remaining Estimate: 0h
            Time Spent: 10m

> RedeliveryPolicy:Exponential Backoff + NonBlockingRedelivery = too long delays
> ------------------------------------------------------------------------------
>
>                 Key: AMQ-8617
>                 URL: https://issues.apache.org/jira/browse/AMQ-8617
>             Project: ActiveMQ
>          Issue Type: Bug
>            Reporter: Endre Stølsvik
>            Priority: Minor
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Scenario on client:
>  # Employing RedeliveryPolicy with exponential backoff (keeping maximum 
> redeliveries at default 6)
>  # Enabled non-blocking redelivery
>  # Receiving e.g. 100 consecutive poison messages which are rolled back 
> repeatedly (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.
> I'll submit a PR.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to