TopicUnsubRequest¶
Purpose¶
Unsubscription request for a pub/sub topic.
Type¶
Reception:
Record with fields:
topic
: TopicIdentity
Pub/sub topic identity
scope
: RoutingScope
Whether the unsubscription request is local-only or should be also sent to the network
Triggers:
Result
Structure¶
Field | Type | Description |
---|---|---|
topic |
TopicIdentity | Topic ID to unsubscribe |
scope |
RoutingScope | Whether the unsubscription request should be sent to the network |
Behavior¶
If the topic does not exist yet in the RoutingTable, the EngineIdentity of the requesting engine is added to the RoutingTable, and a TopicSubResponse is returned with a success result.
Otherwise, if the topic does not exist yet:
- when the
scope
is LocalOnly, an error is returned - when the
scope
is Any, the Router sends a SubscribeRequest to PubSub
Message flow¶
sequenceDiagram
%% --8<-- [start:sequence]
Any Local Engine ->>+ Router: TopicUnsubRequest
Router ->>+ PubSub: UnsubscribeRequest
PubSub -->>- Router: UnsubscribeResponse
Router -->>- Any Local Engine: TopicUnsubResponse
%% --8<-- [end:sequence]