NOTE: Following on from the responses I got, it seems that Azure Service Bus is not the right tool for this job. I'm leaving the question here in case it's of use to anyone else.
I want to set up a situation where I have one app that publishes messages, and multiple apps that receive the messages. From what I can see, Azure Service Bus Topics is designed for this. The accepted answer to this question says the same thing.
I have been following the quick start sample to produce two console applications, one to send messages and one to receive them. This works fine when I only have one instance of the receiver app running, but if I start two instances of the receiver, only one of them gets any messages.
I tried removing the call to CompleteAsync
in the code that receives the messages, but this didn't make any difference.
The code I'm using is exactly as shown in that article, so no point in posting it all here.
I'm sure I'm just misunderstanding something basic, but I thought the idea was that topics and subscriptions allowed you to have as many receivers as you like.
Anyone able to explain what I'm doing wrong?