You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This sample shows a basic two-endpoint scenario exchanging messages with each other so that:
16
+
This sample shows a usage of hierarchy namespace with Azure Service Bus with a hierarchy escape mechanism included. Note the following line in the configuration for `Endpoint1`:
17
17
18
-
*`Endpoint1` sends a `Message1` message to `Endpoint2`.
19
-
*`Endpoint2` replies to `Endpoint1` with a `Message2` instance.
18
+
snippet: excludedMessage
19
+
20
+
This makes sure that sending a message of a type `MessageExcluded` does not take hierarchy (`my-hierarchy`) into consideration.
21
+
22
+
Pressing `2` tries sending a message (of the `MessageExcluded` type) to `Endpoint2`. This endpoint is included in the hierarchy, but the escape mechanism excludes this type of a message. Effectively, the message is tried to be sent to `Samples.ASBS.HierarchyNamespaceEscape.Endpoint2`. Such an endpoint doesn't exist. This is why this attempts ends with an exception: `Azure.Messaging.ServiceBus.ServiceBusException: Put token failed. status-code: 404, status-description: The messaging entity 'sb://xxx.servicebus.windows.net/Samples.ASBS.HierarchyNamespaceEscape.Endpoint2' could not be found.`.
23
+
24
+
Pressing `3` sends a message of the same type to `Endpoint3`. This endpoint is not included in the hierarchy. This is why this attempts succeeds.
20
25
21
26
### Transport configuration
22
27
23
28
snippet: config
24
29
30
+
Two endpoints (`Endpoint1` and `Endpoint2` are configured to be included in the hierarchy `my-hierarchy`). `Endpoint3` is not included in the hierarchy.
31
+
32
+
snippet: namespaceOptions
33
+
34
+
This means that the endpoints will be effectively:
This sample shows a usage of hierarchy namespace with Azure Service Bus. Both endpoints (`Endpoint1` and `Endpoint2`) are configured using `HierarchyNamespace`:
17
-
18
-
snippet: namespaceOptions
19
-
20
-
This means that the endpoints will be effectively:
0 commit comments