I'm a few hours into understanding the Azure Service Bus architecture. I'm wondering specifically if this queueing technology can be used to support message routing - something similar to RabbitMQ's routing abilities. http://www.rabbitmq.com/tutorials/tutorial-four-python.html
We will use a direct exchange instead. The routing algorithm behind a direct exchange is simple - a message goes to the queues whose binding key exactly matches the routing key of the message.
In this setup, we can see the direct exchange X with two queues bound to it. The first queue is bound with binding key orange, and the second has two bindings, one with binding key black and the other one with green.
In such a setup a message published to the exchange with a routing key orange will be routed to queue Q1. Messages with a routing key of black or green will go to Q2. All other messages will be discarded.
Looking for somebody with deep understanding of the Service Bus architecture to recommend the best vector for implement this sort of queue.
What is an Azure Service Bus queue? A Service Bus queue is an entity in which messages are stored. Queues are useful when you have multiple applications, or multiple parts of a distributed application that need to communicate with each other.
To send a message to a Queue or a Topic, right click on the queue or topic name on the Service Bus Explorer navigation pane and select “Send Messages”.
Azure Service Bus offers three types of communication mechanisms; queues, topics and, relays. Queues and Topics, facilitate one-directional communication. Messages will be stored until they are consumed. Each message in Queue is received by a single recipient.
Windows Azure Service Bus Topics and Subscriptions allow you to do exactly the same:
Let's compare the image to your example:
Topic
in the image.Subscription
(with a Filter
set to Redmond)Subscription
(without Filter
, meaning it would receive all messages).It's actually very simple. Your clients send a message to the Topic (similar to a queue) and can add some metadata to this message (this can be used as a binding key
). Now you don't read messages from the Topic itself, the Topic will forward the messages to all Subscriptions. To implement message routing you would simply set a filter on one or more Subscriptions using a syntax similar to SQL.
Python tutorial: How to Use Service Bus Topics/Subscriptions
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With