-
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] ServiceBusProcessorClient not obeying maxConcurrentSessions #24047
Comments
@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 @ankitrajsingh, thanks for sharing the details. I was able to create a repro and can see that the messages across sessions are delivered serially. I'll be looking into enabling the concurrency feature; it seems quite a bit of code needs to be changed and requires some discussion in behavior change. Given that the callbacks are not invoked serially, existing consumers need to prepare/change their handler to be thread-safe. |
Sure thanks 👍 |
Hi @anuchandy, is there any progress on this issue? |
@anuchandy An update would be great |
Hi @jwyseu, I've updated the other issue 27336. Closing this issue as this is a duplicate. |
Describe the bug
MaxConcurrentSessions is not being obeyed by session based ServiceBusProcessorClient. It does appears to lock onto multiple sessions but processes only 1 message from any one session at a given time (Single Threaded). Expectation is to process 1 message from each of the locked session concurrently as per the SDK Doc and Github Readme.
Exception or Stack Trace
NA
To Reproduce
Steps to reproduce the behavior:
Code Snippet
Add the code snippet that causes the issue.
Expected behavior
Expected behaviour is that the client should process 1 message from each of the sessions concurrently when supplied with maxConcurrentSessions and locked onto multiple sessions.
For example,
Scenario: Multiple sessions say session1, session2, session3, etc are present in ASB and maxConcurrentSessions is set to 3 in the client.
Expectation: Client will process 1 message from each of the session1, session2 and session3 concurrently. Throughput = at most 3 messages (each belonging to different sessions) at a given time
Actual: Client is processing only 1 message from session1 alone at a given time and afterwards repeating the same process with messages from session2 sequentially. Throughput = 1 message at a given time
Screenshots
Logs describing only 1 message from any one session is being processed at a given time although multiple sessions are available. Thread name under which all messages are being processed is same i.e [oundedElastic-2] which signifies single threaded sequential execution.
Setup (please complete the following information):
If you suspect a dependency version mismatch (e.g. you see
NoClassDefFoundError
,NoSuchMethodError
or similar), please providemvn dependency:tree
)NA
Additional context
Client does appear to process messages from sessions concurrently when MaxConcurrentCalls are set along with MaxConcurrentSessions in the session based ServiceBusProcessorClient. But this also causes parallel processing of messages from the same session thereby disrupting the ordered nature of messages within a session.
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: