Open App

Azure Service Bus Autoforwarding

Autoforwarding is an Azure Service Bus feature that automatically routes messages from a source queue or subscription to a target queue or topic within the same namespace. This helps decouple publishers and consumers and facilitates custom routing topologies.

Why Use Autoforwarding?

Autoforwarding is commonly used to implement specific messaging architectures:

1. The Queue Ownership Model

In large systems, different development teams might consume messages from a shared topic. Rather than multiple consumers reading directly from subscription endpoints on a single shared topic, each consumer team can define a subscription that autoforwards messages to a private queue they own and control.

This allows each team to manage their own queue configurations, such as lock durations, TTL, and dead-letter queue (DLQ) policies, without affecting other subscribers.

2. Message Consolidation

You can consolidate messages from multiple subscriptions or queues into a single processing queue. Instead of configuring consumer applications to poll several distinct endpoints, they poll a single target queue, simplifying consumer scaling and deployment.

3. Decoupling Publishers and Consumers

Publishers send messages to a generic entry point topic. Autoforwarding rules route those messages to specialized queues based on subscription filter rules, shielding publishers from consumer-side queue changes.

Core Mechanics and Limitations

When working with autoforwarding, keep these key behaviors in mind:

Bussin dashboard showing folders and queue routing options
Inspect your namespace's queues and topics, and check for active forwarding configurations in Bussin. (Click to zoom)