I am trying to create a pub / sub with a service bus. I started with this tutorial and it has been working so far: https://azure.microsoft.com/en-gb/documentation/articles/service-bus-dotnet-how-to-use-topics-subscriptions/
But in my dedicated case, I donβt know exactly how I should do this:
I have an api web application running on an azure web application that scales to three instances. I have a console application client that runs some messages in a dedicated section.
What I want to achieve is that all three instances of the web api receive delivered messages that are sent to the message bus. Thus, this action preventing fire:
- The client sends a message to the topic
- Each subscriber who STRONGLY subscribes to this topic should receive a message
I am not interested in old messages that were sent when the subscriber was inactive / offline. I just synchronize the memory cache in these instances, so this is really short life information when I need to know which keys I must invalidate. but it is important that each subscriber receives information in order to avoid outdated data.
I'm not quite sure that I need to dynamically create a subscription in the web api startup code so that each instance has its own subscription or can I subscribe all instances of web applications to the same subscription? I would not want to create subscriptions dynamically, since I do not know when to delete them again (for example, reduced to two copies instead of three). but I could not find any documentation on how to do this, and if so, that several clients are subscribing to the same subscription or I need to create a subscription for each client.
source share