- Azure Service Bus Topologies
- Azure Service Bus Topologies with Forwarding (current)
- Azure Service Bus Topologies of NServiceBus (next)
- Azure Service Bus Topology migration with NServiceBus
In the previous blog post, I introduced topologies for Azure Service Bus and how topics and subscriptions can be leveraged to build reliable publish and subscribe infrastructure.
All the approaches described in the last post have one major drawback: Subscriptions need to be managed for all events the subscriber wants to subscribe to. This doesn’t sound like a huge deal given that a subscription is an entity that has to be created with its rules once on the broker. But subscriptions act like virtual queues. They store copies of messages that matched the rules in the subscriptions queue. Therefore the subscriber needs to attach one or multiple receivers to the subscription it manages. Every receiver attached to an entity has its own concurrency limitations and receiving infrastructure managed by potentially multiple worker threads. A subscriber does not only have to manage the
Wouldn’t it be nice if we could automatically enqueue all messages in the input queue of the subscriber without having to manage
When the subscriber creates a subscription all it has to do is to set the ForwardTo property of the subscription to its input queue like the following pseudo-code illustrates
var sub = new SubscriptionDescription ("Bundle", "Subscriber.EventA");
sub.ForwardTo = "Subscriber";
Once this is done any attempt to try to receive messages from the subscription will fail because the subscription is in auto-forwarding mode.
With the auto-forwarding enabled whenever a message that was published to the Bundle topic matches a rule in a
In the Azure Service Bus adapter of
In the next post I’ll dive into the characteristics of the EndpointOriented as well as the Forwarding Topology of NServiceBus, the reasons why Particular wants to slowly migrated existing customers over to the Forwarding Topology and how the migration scenario has been designed to enable zero-downtime migration.
On a final note: In this