Reputation: 9930
I have a .NET Core app running which is listening to an Azure Service Bus topic. When I run the app I get this error:
A sessionful message receiver cannot be created on an entity that does not require sessions. Ensure RequiresSession is set to true when creating a Queue or Subscription to enable sessionful behavior.
I think the code is running on a separate thread and I can't seem to find the point where the Exception is thrown.
I also don't have a D:\ drive which is where the SessionClient.cs file is located.
Is this D:\ drive in Azure, and if so does this mean there is code running in Azure?
How can I debug this?
Upvotes: 1
Views: 4329
Reputation: 4368
For me the fix mas to delete the Service Bus queue and re-create it with Enable Sessions
checked.
Upvotes: 1
Reputation: 117
Erase your queue and create it again wihtout the 'Require session' checked. Also check your code because maybe you have set the bool RequireSession to true. The fact is that you have enable or disable the sessions once you have configured the queue in the opposite configuration
Upvotes: 1
Reputation: 26057
You're getting the stacktrace that includes the reference of the sources compiled and deployed for that version of the package. The D:\
drive is irrelevant to the issue. What this is is a mismatch how you receive messages and how the entity is configured. You appear to have a sessionless entity, but in the code, you use a receiver that is configured to work with a session.
Upvotes: 0