-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Abandoned messages in a session queue are not made re-available immediately which disrupts the ordered processing of session based messages #24064
Comments
It feels like an issue of either
Sample Snippet for iteratively closing the low level receiver on message complete or abandon-
|
@anuchandy could you please follow up with @ankitrajsingh? |
Hi @anuchandy, please let me know if something else is needed on the issue. Would be great if you can help us out. Thanks! |
Hi @joshfree @anuchandy , could you guys please assist with this issue? |
Thanks for reporting @ankitrajsingh @anuchandy, @conniey and I discussed this offline and wondered if there are any service limitation here in providing the abandoned message immediately. I tried our JS client and am able to get the abandoned message in the next receive operation. So, this must be a bug with the Java SDK @anuchandy, @conniey While the behavior in the processor client can be explained by us adding a credit on the line before the user settles a message, is that the same thing that is happening with the low level receiver client as well? |
Hi @ankitrajsingh, I am working on this issue and below are some updates: I can repro the issue by using The root cause has been identified: As we are using reactor However, there is a follow up similar issue when concurrent session number > 1. I am still working on the fix and will keep updates. |
HI @liukun-msft , at this point of time i would not be able to provide the logs for ServiceBusReceiverClient as i have left the project, but yes I can confirm that it works with ServiceBusReceiverClient as mentioned in my detailed comment: #24064 (comment) Btw, Thanks for long needed update. And your reasoning seems correct and right to the point as myself was able to reach same conclusion when debugging the library.
|
When we set Current, we use When a message is saved to the queue, I'll take some time to summarize related docs and re-think the design of session receiver. |
Hi @liukun-msft , The issue you described was raised way back by me. |
Hi @ankitrajsingh, thanks so much for providing that. All the issues you reported are really helpful! |
Describe the bug
Upon abandoning a message in a session based queue, the message is not made re-available immediately upon next receive operation. It becomes re-available after some of the messages with higher sequence number have been processed. Hence the ordering/sequencing of the messages are broken.
Exception or Stack Trace
No Exception Raised
To Reproduce
Steps to reproduce the behavior:
Code Snippet
Expected behavior
Scenario: Say two ordered message exist in a session with sequence number 1 and 2. Upon processing message with seq no. 1, please assume it is abandoned.
Expectation: Message with seq no. 1 is to be made re-available immediately on next receive operation. Message having seq no. 2 should only be made available when message with seq no. 1 has either been delivered successfully(completed) or has exceeded its max delivery limit.
Actual: Message with seq no. 2 is being made available on the next receive operation. Only after it has been processed, the message with seq no. 1 is made re-available for reprocessing.
Screenshots
Please see the coloured rectangles(two different colours). Each colour corresponds to a single message being redelivered on abandoning it. The rectangles belonging to a particular abandoned message is interleaved with logs of messages having greater seq number.
Setup (please complete the following information):
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
The text was updated successfully, but these errors were encountered: