AzureNetQ icon indicating copy to clipboard operation
AzureNetQ copied to clipboard

Contention issue on initial startup with multiple subscribers

Open grumpydev opened this issue 11 years ago • 0 comments

I have multiple workers that subscribe with the following code:

            this._bus.SubscribeAsync<Message>(this.OnMessageReceived,
                config =>
                    {
                        config.WithSubscription(this._configuration["SubscriptionId"]);
                        config.WithTopic(this._configuration["Topic"]);
                    });

When I fire the workers up for the first time they all hit "TopicDeclare" and try and create the topic, which makes two of them crash with Conflict errors:

image

They start up again fine, as the next time they run they can see the topic already there so don't try and create it.

I guess the topic creation needs some code to handle conflicts and back off for a period then re-check if the topic exists?

grumpydev avatar Jul 16 '14 09:07 grumpydev