Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions servicecontrol/transports.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,25 @@ As of versions 4.33.3 and 5.0.5 of ServiceControl, support for partitioned entit

* `EnablePartitioning=<True|False>` — Configures the transport to create entities that support partitioning. The default value is `false`.

### Enabling Hierarchical Entities

When [a hierarchy namespace prefix](/transports/azure-service-bus/configuration.md#entity-creation-hierarchy-namespace) is configured on endpoints, ServiceControl needs to be configured for the hierarchy namespace to monitor those endpoints.

At a minimum, the error queue name needs the prefix prepended to the queue name, separated by a `/`. If monitoring or auditing are enabled, they also need to be modified.

For example, given a hierarchy namespace of `my-hierarchy` and error, audit, and monitoring queues named `error`, `audit`, and `monitoring`:
- The [error queue name](/servicecontrol/servicecontrol-instances/configuration.md#transport-servicebuserrorqueue) would need to be set to `my-hierarchy/error`.
- The [audit queue name](/servicecontrol/audit-instances/configuration.md#transport-servicebusauditqueue) would need to be set to `my-hierarchy/audit`.
- The [monitoring queue name](/servicecontrol/monitoring-instances/configuration.md#transport-monitoringerrorqueue) would need to be set to `my-hierarchy/monitoring`.

This isolates the ServiceControl instance to the hierarchy, so an instance-per-hierarchy would be required to monitor multiple hierarchies.

#### Configuring a single ServiceControl instance for multiple hierarchies

Endpoints configured with a hierarchy namespace will use error, audit, and monitoring queues prefixed with the hierarchy namespace. To monitor all hierarchies with a single ServiceControl installation:
1. Configure ServiceControl error, audit, and monitoring instances as you would without using a hierarchy namespace.
2. For each hierarchy-specific error, audit, and monitoring queue that you wish to monitor centrally, configure [auto-forwarding for their corresponding queues in azure](https://learn.microsoft.com/en-us/azure/service-bus-messaging/enable-auto-forward#update-the-auto-forward-setting-for-an-existing-queue) to forward messages to the central error, audit, and monitoring queues.

### Example connection string

```text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ snippet: azure-service-bus-hierarchynamespace-options

Doing so will prefix all entities with the `{HierarchyNamespace}/{original-entity-path}` format.

> [!NOTE]
> Using a hierarchy namespace has [implications for ServiceControl configurations](/servicecontrol/transports.md#azure-service-bus-enabling-hierarchical-entities).

#### Escaping the hierarchy

In scenarios when a message must be sent outside of the hierarchy, designated message types or interfaces can defined and excluded from the hierarchy using the `HierarchyNamespaceOptions.ExcludeMessageType<TMessageType>()` method.
Expand Down