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
- Snippets: migrate from callback constructor to object initializer API
- Remove MaxMessageLength (removed from transport)
- Add circuit breaker section to connection-settings
- Document --assembly option for polymorphic subscribe/unsubscribe
- Add hierarchy unsubscribe example with warning about unintended removals
- Update large message bodies description to reference MAXMSGL
> Ensure the sanitizer produces deterministic and unique names. Two different input names mapping to the same sanitized name will cause messages to be delivered to the wrong endpoint.
98
98
99
+
## Circuit breaker
100
+
101
+
If the transport cannot communicate with the queue manager for a sustained period, it triggers a critical error. The default timeout is 2 minutes:
Copy file name to clipboardExpand all lines: transports/ibmmq/operations-scripting.md
+48Lines changed: 48 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,6 +85,21 @@ This command:
85
85
1. Creates a topic object named `PROD.MYCOMPANY.EVENTS.ORDERPLACED` (if it does not exist).
86
86
2. Creates a durable subscription linking the topic to the `OrderService` input queue.
87
87
88
+
#### Polymorphic subscriptions
89
+
90
+
To subscribe to a base class or interface and all its concrete implementations, provide the `--assembly` option with the path to the assembly containing the event types:
91
+
92
+
```bash
93
+
ibmmq-transport endpoint subscribe OrderService \
94
+
"MyCompany.Events.IOrderEvent" \
95
+
--topic-prefix PROD \
96
+
--assembly /path/to/MyCompany.Events.dll
97
+
```
98
+
99
+
The CLI loads the assembly, discovers all types that derive from or implement the specified event type, and creates a subscription for each.
100
+
101
+
Without `--assembly`, only a single subscription for the exact type name is created.
102
+
88
103
### Unsubscribe an endpoint from an event
89
104
90
105
Removes the durable subscription for an event type:
The `--assembly` option can also be used with `unsubscribe` to remove subscriptions for all derived types at once. Given the following event hierarchy:
113
+
114
+
```csharp
115
+
publicinterfaceIOrderEvent { }
116
+
publicclassOrderPlaced : IOrderEvent { }
117
+
publicclassOrderBilled : IOrderEvent { }
118
+
publicclassOrderCancelled : IOrderEvent { }
119
+
publicclassPriorityOrderPlaced : OrderPlaced { }
120
+
```
121
+
122
+
Unsubscribing from `OrderPlaced` with the `--assembly` option:
This removes subscriptions for `OrderPlaced`**and**`PriorityOrderPlaced` (its derived type), but leaves subscriptions for `OrderBilled`, `OrderCancelled`, and `IOrderEvent` intact.
132
+
133
+
> [!WARNING]
134
+
> Using `--assembly` to unsubscribe from a type in the middle of a hierarchy removes subscriptions for that type and **all types below it**. This can silently stop event delivery if other parts of the system still expect those events to arrive. Prefer unsubscribing from each concrete event type individually:
0 commit comments