You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 aMessagingEntityAlreadyExistsException
. 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:
Since
MessagingEntityAlreadyExistsException
derives fromMessagingException
, the solution is to catchMessagingException
instead.The text was updated successfully, but these errors were encountered: