Skip to content

Commit 0a9e649

Browse files
Update topology description to indicate the topic creation (#7164)
1 parent 57afbae commit 0a9e649

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

transports/azure-service-bus/topology_description_asbs_[3,5).partial.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,17 @@ This creates a new `bundle-2` topic, a subscription called `forward-bundle-2` on
2525
> [!NOTE]
2626
> While it is technically possible to create even deeper hierarchies (e.g. attaching a `bundle-3` to `bundle-2`), it is strongly discouraged to do so due to the complexity and limitations of the number of hops a message can be routed through. The maximum allowed number of hops in Azure Service Bus is four and needs to be considered when creating a topology hierarchy. In addition, introducing more forwarding hops also increases the number of operations used, affecting pricing or memory/CPU used depending on the selected Azure Service Bus tier.
2727
28+
#### Topic creation
29+
30+
In the ForwardingTopology, all events are published to a single shared topic (default: bundle-1). This topic is considered shared infrastructure and is automatically created by any endpoint that requires it — whether it’s a publisher or a subscriber.
31+
32+
With installers enabled, each endpoint ensures the topic exists as part of its startup process. This allows publishing to succeed even if no subscribers are yet active.
33+
34+
In systems using a topic hierarchy (e.g., bundle-2 subscribing to bundle-1), the endpoint will automatically create:
35+
- The new secondary topic (e.g., bundle-2)
36+
- A forwarding subscription on the upstream topic (e.g., bundle-1 → bundle-2), if it doesn’t already exist
37+
- Its own subscription under that topic
38+
2839
#### Subscription rule matching
2940

3041
```sql

transports/azure-service-bus/topology_description_asbs_[5,).partial.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,16 @@ By allocating a separate topic for each concrete event type, the overall system
4646
> [!NOTE]
4747
> If the system has numerous event types beyond these limits, an architectural review is recommended. Additional messaging units or other partitioning strategies may be required.
4848
49+
#### Topic creation
50+
51+
In this topology, topics are created exclusively by subscribers.
52+
53+
When an endpoint subscribes to an event, it creates the corresponding topic when installers are enabled and a subscription to that topic. If no endpoint subscribes to a given event, the topic for that event will not be created—even if another endpoint publishes it.
54+
55+
Even with installers enabled, an endpoint will only provision infrastructure for the events it explicitly subscribes to. As a result, a publisher may receive a 404 Not Found from Azure Service Bus when attempting to publish an event that has no subscribers yet.
56+
57+
This behavior is intentional. NServiceBus establishes subscriptions at runtime, so at transport startup, publishers have no knowledge of which events they will publish. Although topic names can be inferred through mapping conventions, the existence of a mapping does not imply that the topic should be created.
58+
4959
#### Subscription rule matching
5060

5161
In this topology, no SQL or Correlation filtering is required on the topic itself, because messages in a topic are all of the same event type. Subscriptions can use a default “match-all” rule (`1=1`) or the default catch-all rule on each topic subscription.

0 commit comments

Comments
 (0)