feat(#1797): add message delivery tracking to QueueMessageReference#1796
feat(#1797): add message delivery tracking to QueueMessageReference#1796jeanouii wants to merge 2 commits intoapache:mainfrom
Conversation
Add isDelivered()/setDelivered() to QueueMessageReference interface with implementations in IndirectMessageReference (boolean field) and NullMessageReference (no-op). PrefetchSubscription.acknowledge() now marks messages as delivered=true when processing DeliveredAck, enabling downstream consumers to distinguish delivered-but-unacked messages.
activemq-broker/src/main/java/org/apache/activemq/broker/region/IndirectMessageReference.java
Outdated
Show resolved
Hide resolved
activemq-broker/src/main/java/org/apache/activemq/broker/region/IndirectMessageReference.java
Outdated
Show resolved
Hide resolved
activemq-broker/src/main/java/org/apache/activemq/broker/region/IndirectMessageReference.java
Outdated
Show resolved
Hide resolved
activemq-broker/src/main/java/org/apache/activemq/broker/region/IndirectMessageReference.java
Outdated
Show resolved
Hide resolved
| } | ||
|
|
||
| int index = 0; | ||
| for (Iterator<MessageReference> iter = dispatched.iterator(); iter.hasNext(); index++) { |
There was a problem hiding this comment.
It seems this loop overrides what has been done in the previous loop (line 275). Maybe we should merge the logic in one loop ?
|
What caused you to make this change, did you see bugs show up or specific issues with tests? There are no test updates here to demonstrate the issue and fix. I'm not saying the change is incorrect (i haven't reviewed it) but i am wondering what triggered the change here. |
|
@cshannon @jbonofre Not a specific test, but I asked myself many times the question when debugging flaky tests. And I realized even in the Web Console we don't have information on hand. |
I just need time to look at it more, this week has been pretty busy so I'll try to get to the various backlogs of PR reviews next week. |
Add isDelivered()/setDelivered() to QueueMessageReference interface with implementations in IndirectMessageReference (boolean field) and NullMessageReference (no-op). PrefetchSubscription.acknowledge() now marks messages as delivered=true when processing DeliveredAck, enabling downstream consumers to distinguish delivered-but-unacked messages.