Repository navigation
Conversation
Contributor
|
This looks pretty good. However, there are a few issues that need to be resolved. However, rather than go back and forth here I just push a branch with everything I think is needed. Feel free to pull this in and squash it with your own commit. |
The delivery count is tracked on the MessageReference, so a message that is redistributed to another broker of the cluster starts over at zero, causing max-delivery-attempts to be enforced per broker instead of cluster wide. The originating broker now carries the delivery count over on the redistributed copy via _AMQ_REDISTRIBUTION_DELIVERY_COUNT, which the target broker applies when it creates the MessageReference. The behavior is gated by the new address setting preserve-delivery-count-on-redistribution and is disabled by default Assisted-by: Justin Bertram Signed-off-by: Marc Leisi <137479805+leisma@users.noreply.github.com>
leisma
force-pushed
the
delivery-count-with-redistribution
branch
from
November 19, 2026 19:38
c82ebbb to
21db157
Compare
Author
Thanks for the review and the changes @jbertram . I pulled your commit in and squashed it with mine. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The delivery count is tracked on the MessageReference, so a message that is redistributed to another broker of the cluster starts over at zero. This causes max-delivery-attempts to be enforced per broker instead of cluster wide.
The originating broker now carries the delivery count over on the redistributed copy via the _AMQ_REDISTRIBUTION_DELIVERY_COUNT property, which the target broker applies when it creates the MessageReference. The behavior is gated by the new address setting preserve-delivery-count-on-redistribution (default false).
The property is set between redistribute() and processRoute(): earlier it would be reset by clearInternalProperties(), later the MessageReference already exists. For the same reason it is not an internal property, so it stays visible to clients on the target broker, like _AMQ_INGRESS_TIMESTAMP.
The target broker only applies the count if the receiving queue has the setting enabled itself (internal queues such as store-and-forward are skipped), and only reads the property in that case, so a broker with the feature off pays nothing. Asymmetric configurations and rolling upgrades are therefore safe.
Supporting changes:
The setting defaults to false, so existing behaviour is unchanged. RedeliveryWithRedistributionClusterTest covers the baseline, the default reset, the preserved count, restart, asymmetric configuration and a client-supplied property.
https://issues.apache.org/jira/browse/ARTEMIS-6311