-
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] Lost service bus messages using ServiceBusReceiverClient #30861
Comments
did you tried with PEEK_LOCK Mode? is it same behaviour with PEEK_LOCK mode? PEEK_LOCK Mode should resolve your issue. |
Yes - I mentioned in the code snippet above that PEEK_LOCK mode does also resolve the issue. This seems like a workaround rather than a fix though - should I not expect RECEIVE_AND_DELETE mode to work as it used to? If for some reason my configuration is not supported then I would expect an explicit error at the time I configured it, not silently dropped messages. |
@ZejiaJiang could you follow up with @pjrharley on this issue? cc: @Azure/azsdk-sb-java |
Hi @pjrharley , thank you for your report, I'm looking at this issue. |
I believe I've got a reproduction of this issue, I'm not sure it's as minimal as possible but I distilled it down from what I had in our application: https://github.com/pjrharley/ServiceBusIssue30861Example It doesn't happen every time so clearly there's a timing element to it (it happened more often within our application) but I found if I run it a few times it'll usually print something like:
And you can see in that example that |
@pjrharley thank you for the detail, we do have another message credit calculation issue (prefetch configuration) now, I'm checking them. |
Hi @pjrharley , Yeah, you are right, before the second receiver establish , the second send message arrived in client, and then the client release it, the reason why you may get 0, 1 or 2 messges in second receive, it rely on when the message arrived the client and when the receiver established and credit calculation wrong, I'll discuss with my coworker about it. Thank you! |
We are planning to fix this in next release. |
Hi @pjrharley , a few days later the new release will be published, you can try the letest version. |
Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you! |
Hi @ZejiaJiang - I've just updated my example application to 7.13.0 and it does look like this problem is now fixed. Thanks very much!! |
Hi @pjrharley , thank you for your reply. I'm going to close this issue, if you meet this issue again, you can reopen it, I'm glad to help you! |
Describe the bug
We are not receiving messages from a service bus subscription that I have otherwise confirmed are being published.
Futhermore I've narrowed this down to one version change that introduces the problem (7.5.2 is fine, 7.6.0 is not) and a simple, seemingly unrelated change that works around the issue.
Exception or Stack Trace
Error message seen:
The stack trace that arrived there:
To Reproduce
Steps to reproduce the behaviour:
Code Snippet
Expected behavior
We should have received 2 messages. Instead we get 0, 1 or 2, seemingly at random.
Setup (please complete the following information):
Additional context
I believe the problem was introduced during this change:
e795856
Looking at the change you can see why the prefetch setting effects the outcome - the
asyncClient.release
call is only made when prefetch is disabled.The text was updated successfully, but these errors were encountered: