You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@artemis.apache.org by "Marc Leisi (Jira)" <ji...@apache.org> on 2026/10/19 08:20:00 UTC
[jira] [Created] (ARTEMIS-6311) Delivery count is reset to 0 when a message is redistributed
Marc Leisi created ARTEMIS-6311:
-----------------------------------
Summary: Delivery count is reset to 0 when a message is redistributed
Key: ARTEMIS-6311
URL: https://issues.apache.org/jira/browse/ARTEMIS-6311
Project: Artemis
Issue Type: Bug
Components: Clustering
Affects Versions: 2.57.0
Reporter: Marc Leisi
h4. Description
When a message is redistributed to another broker in a cluster, the `deliveryCount` of the resulting `MessageReference` is reset to `0`.
For us this is not the expected behavior, but it could be "as designed". As we could not find anything about redelivery with redistribution in the docs, we are not shure about that.
*Impact:*
* {{max-delivery-attempts}} / dead-letter-address handling no longer works reliably for messages that get redistributed: the delivery count keeps resetting on every redistribution hop.
* A "poison" message can in theory be redistributed repeatedly across cluster nodes without ever reaching the configured delivery limit, bypassing DLQ handling entirely.
*Environment:*
Apache Artemis 2.57.0, symmetric cluster with two brokers.
*Expected behavior:*
The delivery count is propagated/preserved when a message is redistributed to another broker, so that {{max-delivery-attempts}} and redelivery-delay calculations keep working correctly regardless of how many times, and to which node, a message has been redistributed.
*Actual behavior:*
The delivery count is not propagated. When a message is redistributed, the counter is reset to 0 and the full redelivery cycle starts again from the beginning on the new node.
*Reproduction:*
To reproduce the issue, we created [an integration test|https://github.com/leisma/artemis/blob/simulate-message-count-reset/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/RedeliveryWithRedistributionClusterTest.java] that covers the simulation of the actual behavior.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For additional commands, e-mail: issues-help@artemis.apache.org