Skip to content

feat(#1797): add message delivery tracking to QueueMessageReference#1796

Open
jeanouii wants to merge 2 commits intoapache:mainfrom
jeanouii:feat/message-delivery-tracking
Open

feat(#1797): add message delivery tracking to QueueMessageReference#1796
jeanouii wants to merge 2 commits intoapache:mainfrom
jeanouii:feat/message-delivery-tracking

Conversation

@jeanouii
Copy link
Contributor

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.

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.
@jeanouii jeanouii changed the title [#RODO] feat(#TODO): add message delivery tracking to QueueMessageReference feat(#1797): add message delivery tracking to QueueMessageReference Mar 18, 2026
}

int index = 0;
for (Iterator<MessageReference> iter = dispatched.iterator(); iter.hasNext(); index++) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems this loop overrides what has been done in the previous loop (line 275). Maybe we should merge the logic in one loop ?

@cshannon
Copy link
Contributor

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.

@jbonofre
Copy link
Member

@cshannon I think it's coming for a flaky test (or needed by a test). @jeanouii am I right ?

@cshannon
Copy link
Contributor

@cshannon I think it's coming for a flaky test (or needed by a test). @jeanouii am I right ?

Yeah that would make sense, if there is an existing test already that is flaky that this fixes then that demonstrates the issue and fix but it would be helpful to know which one

@jeanouii
Copy link
Contributor Author

@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 don't recall about a very specific test to be honest.
If you guys think we don't need it, I'm ok with it, I'll put it back locally when I need to debug again in the future

@cshannon
Copy link
Contributor

If you guys think we don't need it, I'm ok with it, I'll put it back locally when I need to debug again in the future

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants