-
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] Process messages of multiple sessions in parallel and keep ordering #27336
Comments
@anuchandy could you assist @christian-vorhemus with their questions? /cc @Azure/azsdk-sb-java |
I took a quick look at this and we may have to move the parallelization up in the reactor chain. Current, we merge all the concurrent sessions into a single flux (ServiceBusSessionManager.java) and then parallelise the subscriber calls (ServiceBusProcessorClient.java) here. |
I think this ticket is kinda related to #24047 |
Hi @jwyseu, we haven't got a chance to pick this task due to other priorities. As this introduces behavior changes, and we want to re-think how we allocate the threads and max-cap for the thread-pool (impacting existing customers), the next step is to develop a design doc, brainstorm, and get the required approvals. Once that phase is over, we'll implement and update the documentation/samples to call out the change. You're right that the issue you linked 24047 is a duplicate. I just closed it so that we have one ticket to track. |
Identified why this is happening, opened a work item to rework session-processor here #33706. Closing this infavor of 33706 |
We are using the Java azure-messaging-servicebus 7.5.2 Maven package. Our goal is to process multiple sessions in parallel and keep message ordering. For demonstration purpose, let's assume we put the following messages into an Azure Service Bus Queue:
• Message “a” to session “0”
• Message “b” to session “0”
• Message “c” to session “0”
• Message “d” to session “1”
• Message “e” to session “1”
• Message “f” to session “1”
The following class is used to receive the messages
this might print
so only one session is processed a time. In previous versions of the SDK, for example in 3.6.6, the following code...
... might lead to this output
We see that messages in 2 sessions are processed in parallel and message ordering within a session is kept - as it should be. This opens up two questions:
improve documentation
As part of this feature-work, make sure to improve the Javadoc on maxConcurrentSessions and maxConcurrentCalls
The text was updated successfully, but these errors were encountered: