question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Microsoft.Azure.ServiceBus] Failed to retreive session ID from broker. Please retry

See original GitHub issue

Describe 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:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
axisccommented, Jan 28, 2021

@Marusyk - do let us know if you have more follow up questions. If not, I’ll proceed to close this issue.

1reaction
axisccommented, Jan 20, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Microsoft.Azure.ServiceBus.QueueClient :Failed to retreive ...
I can successfully send message to my server but fail to receive message with error: Failed to retreive session ID from broker. Please...
Read more >
Troubleshoot AMQP errors in Azure Service Bus
You see this error when a new AMQP connection is created but a link isn't created within 1 minute of the creation of...
Read more >
Troubleshooting guide for Azure Service Bus
This article provides troubleshooting tips and recommendations for a few issues that you may see when using Azure Service Bus.
Read more >
Azure Service Bus client library for Java - version 7.14.3
Microsoft Azure Service Bus is a fully managed enterprise integration message broker. Service Bus can decouple applications and services.
Read more >
Message sessions - Azure Service Bus
This article explains how to use sessions to enable joint and ordered handling of unbounded sequences of related messages.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found