[Microsoft.Azure.ServiceBus] Failed to retreive session ID from broker. Please retry
See original GitHub issueDescribe the bug Use ServiceBus Topics with Session enabled. Got the following error on consuming events:
Failed to retreive session ID from broker. Please retry
What does it error mean? Is it documented somewhere? How to avoid that error?
Expected behavior No errors
Actual behavior (include Exception or Stack Trace)
Failed to retreive session ID from broker. Please retry
Microsoft.Azure.ServiceBus.ServiceBusException: Failed to retreive session ID from broker. Please retry. at Microsoft.Azure.ServiceBus.SessionClient.AcceptMessageSessionAsync(String sessionId, TimeSpan operationTimeout) at Microsoft.Azure.ServiceBus.SessionReceivePump.SessionPumpTaskAsync()
To Reproduce
var options = new SessionHandlerOptions(ExceptionReceivedHandler)
{
MaxConcurrentSessions = _options.MaxConcurrentCalls,
AutoComplete = true
};
SubscriptionClient.RegisterSessionHandler(async (session, message, ct) => await messageHandler(message), options);
Environment:
Microsoft.Azure.ServiceBus 4.1.3 Hosting platform or OS: docker Linux container
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top GitHub Comments
@Marusyk - do let us know if you have more follow up questions. If not, I’ll proceed to close this issue.
ah, my apologies. my recommendation was incorrect, the async method should include
session
as one of the parameters.The specific error means that the application is trying to receive messages on a session which has no more messages on it. When such an error is seen, the session can be abandoned and the program should accept the next session.