[BUG] ASB: ordered delivery with maxConcurrentSessions > 1 only possible single-threaded #24487
Closed
3 tasks done
Labels
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
issue-addressed
Workflow: The Azure SDK team believes it to be addressed and ready to close.
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Service Bus
Milestone
Describe the bug
With a
ServiceBusProcessorClient
andmaxConcurrentSessions > 1
, still only one message is being processed simultaneously. The received order of the messages for any session is correct though.When setting
maxConcurrentSessions > 1
AND alsomaxConcurrentCalls > 1
, the throughput is increased, but the order of the messages is not maintained any more.Expected behaviour
Two (or more) sessions can be processed completely concurrently, while also maintaining the order of messages per session.
To Reproduce
I slightly modified ServiceBusSessionProcessorSample.java, full code can be found below.
First send 20 messages:
The message processing consumer takes 1 second per message to consume.
Scenario 1: When setting
maxConcurrentSessions(2)
, the consumption of all events still takes 20 seconds.Scenario 2: When setting
maxConcurrentSessions(2)
andmaxConcurrentCalls(2)
, it only takes 10 seconds, but the order is not correct any moreScenario 1 logs:
Scenario 2 logs:
Especially notice the wrong order of those 2 lines:
Code
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: