You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Endre Stølsvik (Jira)" <ji...@apache.org> on 2022/05/30 23:53:00 UTC
[jira] [Updated] (AMQ-8617) RedeliveryPolicy:Exponential Backoff + NonBlockingRedelivery = too long delays
[ https://issues.apache.org/jira/browse/AMQ-8617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Endre Stølsvik updated AMQ-8617:
--------------------------------
Description:
Scenario on client:
# Enabled RedeliveryPolicy with exponential backoff (keeping maximum redeliveries at > 1, e.g. 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.
was:
Scenario on client:
# Enabled RedeliveryPolicy with exponential backoff (keeping maximum redeliveries at > 1, e.g. default 6)
# Enabled non-blocking redelivery
# Receiving e.g. 100 consecutive poison messages (which eventually should DLQ after max redeliveries)
This will result in absolutely 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 redelivers multiple times, the redeliveryDelay field is continuously multiplied by the backoff multiplier, resulting in absolutely massive delays.
I'll submit a PR.
> 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
>
> Scenario on client:
> # Enabled RedeliveryPolicy with exponential backoff (keeping maximum redeliveries at > 1, e.g. 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)