- 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";
namespaceManager.CreateSubscription(sub));
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
[…] Azure Service Bus Topologies with Forwarding (next) […]
[…] Azure Service Bus Topologies with Forwarding (Daniel Marbach) […]
Great article!
The forwarding topology is great to decouple publishers and subscribers. The problem with using the forwarding topology with a single bundle topic is that Azure Service Bus limits a topic to 2000 subscriptions and 2000 rules (SqlFilters).
Do NServiceBus have any workaround for this?
Hi Simon
Thanks for reaching out. Can you elaborate a bit your scenarios which makes “you be concerned about those limitations”?
The forwarding topology allows you to run up to 2000 endpoints with a total of 2000 events per namespace assuming you are running on the premium tier. As outlined in our documentation
https://docs.particular.net/transports/azure-service-bus/legacy/topologies
If you are running on a standard tier then you can have less endpoints and events because there is a tier quota of a maximum of 1000 entities per namespace. For more details please see
https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-quotas
We have several hundred customers running in Azure and so far we haven’t seen this to be a concern but we are eager to hear more and better understand your scenario.
The forwarding topology leverages auto-forwarding. It is possible to manually create additional forwarding rules. By default though the Azure Service Bus transport will only publish to the topic defined in the BundlePrefix (legacy) or TopicName (new ASB transport).See
https://docs.particular.net/transports/azure-service-bus/legacy/configuration/full#configuring-the-topology-forwarding-topology
https://docs.particular.net/transports/azure-service-bus/configuration
Regards
Daniel
[…] Azure Service Bus Topologies with Forwarding […]
[…] Azure Service Bus Topologies with Forwarding […]