UserControl
UserControl

Reputation: 15159

Azure response queues management

I'm planning to implement queue-based communication between a set of web roles and a set of worker roles using one of Microsoft's patterns:

enter image description here

What is not yet clear to me is how to manage the response queues. Each sender (web role) should probably include a response queue name in a message so when one of the receivers process the message it signals to the originating sender only. This is important because the web roles are balanced with ARR (sticky sessions) and they forward processing results back to user browsers with SignalR.

I'm planning to create a response queue when a web role instance starts using the machine name as a queue name. But due to auto-scaling I'll soon end up with a set of abandoned queues, won't I? I could implement something like a queue pool keeping it in SQL DB and deleting the old ones but I don't like that extra complexity. Is there an easier way?

Upvotes: 2

Views: 121

Answers (1)

alwayslearning
alwayslearning

Reputation: 4633

Have you considered using Azure Service Bus Topics/Subscriptions?

You can have a single topic as your 'response queue'. Each sender (web role) can then subscribe to this topic with it's own set of subscription filters (probably check for the name of the web role instance) to receive the response message intended for it.

It saves you the complexity of maintaining multiple response queues.

Upvotes: 1

Related Questions