Closed dariogriffo closed 2 years ago
@mookid8000 , is this on v9 version of Rebus?
@maulik-modi I'm actually not sure... I've every experienced this race condition myself, so it would be cool if @dariogriffo could elaborate a little bit... 🙂
I'm closing this one for now. If this is still a problem, please don't hesitate to bring it up again 🙂
Testing the code locally I found that race conditions can lead to queues/topics/subs to throw exceptions that might be catcheable. Basically if the entity is being created by another process and is not yet available a ServiceBusException is thrown with the "SubCode=40901." as part of the message (there is no specific exception, that's the best way I found to catch that. The following is a piece of code that demonstrates how I did a workaround (obviouslly code must be improved) but is just a suggestion.
In order to reproduce this case, send 100 messages to a topic that hasn't been created yet and do and await of all later