-
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
maxConcurentCallsPerSession replacement when upgrading to Service Bus SDK v7? #33232
Comments
@ZejiaJiang could you please follow up with @danilobanjac on this question? |
Hi @danilobanjac , we do use |
Hi @ZejiaJiang, I'm trying to achieve the following: I want to receive and process sessions concurrently, but the messages within the session are to be sequential. I've tried different combinations and could not come up with the solution. Therefore I've introduced locking, which I would like to avoid. |
Hi @danilobanjac , It seems like a very basic scenario, could you provide some code snippet? And how many sessions do you have? |
This is the session processor I've been using: new ServiceBusClientBuilder()
.connectionString(
azureServiceBusConfig.getConnectionString()
)
// Give priority to the library's retry mechanism
.retryOptions(new AmqpRetryOptions().setMaxRetries(0))
.sessionProcessor()
.disableAutoComplete()
.maxConcurrentCalls(1)
.maxConcurrentSessions(100)
.maxAutoLockRenewDuration(
Duration.ofSeconds(30)
)
.prefetchCount(0)
.receiveMode(ServiceBusReceiveMode.PEEK_LOCK)
.topicName(azureServiceBusConfig.getAlertsTopicName())
.subscriptionName(azureServiceBusConfig.getAlertsTopicSubscriptionName())
.processMessage(alertMessageProcessor::processMessage)
.processError(alertMessageProcessor::processError)
.buildProcessorClient(); |
I've tried also different combinations for |
Thank you @danilobanjac , I got your point, you mean that even under a same session, the message are not sequential, thats cause a race condition in your code. I'll try the code. BTW, I see that you set 100 sessions in the code, do you have 100 sessions? just want to ensure this to repro this issue. |
Correct, I use client ID for the |
Thank you. I'll try to repro the sequential issue in one session first. |
Hi @danilobanjac , After testing and discussing with my coworker, the session processor process message with I'm sorry for this issue and here is a workaround, you can create a |
Thanks for your effort @ZejiaJiang . |
This is a known issue. This is part of our work in: #33706 |
We are also stuck on this issue. We want to concurrently process multiple sessions. But within each session, process message one after the other (we dont care whether sequence is maintained or not. Just that it should not be concurrent).
I expected 5 sessions to be concurrently processed. But do not process concurrently within each session. It appears to me |
Reaching out on this :) |
Seems to be fixed in the azure-messaging-servicebus 7.15.0 release. At least it works for my application. |
Yes, this is addressed in the 7.15.x version, closing. |
Query/Question
What is the equivalent of
maxConcurrentCallsPerSession
for the new Azure Service Bus SDK? I've tried usingmaxConcurrentCalls
, but it seems like it is not working. Thanks!Why is this not a Bug or a feature Request?
It might be a feature request after my question get's answered.
Setup (please complete the following information if applicable):
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: