Open App

Technical Reference Guide

Topic Subscription Monitoring and Routing Rules

Azure Service Bus's Publish-Subscribe (Pub/Sub) engine enables a single publisher to broadcast messages to topics, which then distribute copy sets to individual, independent topic subscriptions. The routing logic is evaluated on the broker using declarative filter rules. This guide provides a detailed breakdown of subscription state properties, filter types (SQL and Correlation), and diagnostic workflows for auditing routing behavior inside Bussin.

Understanding Subscription Filter Types

When a message is published to a topic, the broker evaluates each subscription's active filters. If the message matches, a clone of the message is placed in that subscription's active queue. There are three types of rules:

1. Boolean Filters (`TrueFilter` / `FalseFilter`)

2. SQL Filters (`SqlFilter`)

Evaluates a SQL92-like text statement against incoming message properties (both user-defined headers and system metadata). For example:

sys.Subject = 'Invoice' AND CustomRegion = 'US-East' AND OrderTotal > 150.00

SQL filters support rich logical operators, string comparisons, numerical evaluations, and system namespaces (`sys.`). However, they introduce minor processing overhead during high-volume topic ingress.

3. Correlation Filters (`CorrelationFilter`)

A highly optimized, high-performance rule structure that matches on a flat list of incoming system and custom headers. The broker compares fields using exact value matches:

Because they bypass full SQL parsing engines, Correlation filters are evaluated much faster and are recommended for microservice routing at scale.

Auditing Subscription State Properties

In Bussin's active explorer workspace, opening a topic exposes its subscription collection with real-time operational metrics fetched from management-plane APIs:

Bussin active console showing subscription routing rules and real-time message telemetry
Validate subscription metrics and review filter syntax directly from your browser container.

Troubleshooting Routing and Filter Failures

When messages are missing from subscription partitions, developers can follow a logical diagnostic workflow inside Bussin:

1. Open the target Topic and inspect the Subscription list
2. Review the Subscription's configured filter definition:
   - Check SQL syntax spelling
   - Verify that custom user property keys match incoming message headers exactly
3. If messages are dead-lettered with a `SubscriptionRuleEvaluationException`:
   - Inspect the DLQ header values
   - Check if incoming custom property formats violated the SQL rule types (e.g. comparing string values to numerical limits)
4. Use the "Send Message" modal to publish a test message containing custom properties, validating routing outputs instantly

Next Steps

Expand your cloud integration practices by reviewing our guide on Peek-lock state management, check out Dead-letter recovery procedures, or compare Bussin to other administrative utilities in our Alternative Guide.