Skip to content
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

Race condition in AzureServiceBusQueue when multiple processes are creating the same queue #45

Closed
moswald opened this issue Jun 10, 2016 · 1 comment

Comments

@moswald
Copy link
Contributor

moswald commented Jun 10, 2016

Right now, EnsureQueueCreatedAsync will check if the queue exists, and then if not, it will try to create it. If another process creates the queue in-between these two calls, then the create fails with a MessagingEntityAlreadyExistsException. This is caught and handled and works fine.

However, there's a catch - if another process is currently creating the queue, then it will fail with MessagingException, which is not caught.

The error seen in logs is:

Microsoft.ServiceBus.Messaging.MessagingException: The remote server returned an error: (409) Conflict. SubCode=40901. Another conflicting operation is in progress.

Since MessagingEntityAlreadyExistsException derives from MessagingException, the solution is to catch MessagingException instead.

ejsmith added a commit that referenced this issue Jun 13, 2016
Addresses #45 by catching the base exception
@moswald
Copy link
Contributor Author

moswald commented Jun 13, 2016

Fixed by #46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant