mirror of
https://github.com/logos-messaging/specs.git
synced 2026-02-17 12:43:08 +00:00
add unsubscribe
This commit is contained in:
parent
2de310e56d
commit
92dc20de9f
@ -323,6 +323,9 @@ types:
|
||||
"error:subscribe":
|
||||
type: string
|
||||
description: "Event emitted when subscription to a content topic irremediably fails. The event contains an error message."
|
||||
"error:unsubscribe":
|
||||
type: string
|
||||
description: "Event emitted when unsubscribing from a content topic irremediably fails. The event contains an error message."
|
||||
# Extending `WakuNode` definition
|
||||
WakuNode:
|
||||
fields:
|
||||
@ -364,6 +367,14 @@ functions:
|
||||
description: "The content topics for the node to subscribe to."
|
||||
returns:
|
||||
type: void
|
||||
unsubscribe:
|
||||
description: "Unsubscribe from specific content topics"
|
||||
parameters:
|
||||
- name: contentTopics
|
||||
type: Array<string>
|
||||
description: "The content topics for the node to unsubscribe from."
|
||||
returns:
|
||||
type: void
|
||||
```
|
||||
|
||||
#### Predefined values
|
||||
@ -382,9 +393,11 @@ Only messages on subscribed content topics SHOULD be emitted by `messageEmitter`
|
||||
**`error`**:
|
||||
|
||||
Only irremediable failures should lead to emitting a `"error:subscribe"`.
|
||||
Failure to reach nodes can be omitted, and should be handled via the health (TODO) events;
|
||||
Failure to reach nodes can be omitted, and should be handled via the health events;
|
||||
[P2P-RELIABILITY](/standards/application/p2p-reliability.md) SHOULD handle automated re-subscriptions and redundancy.
|
||||
|
||||
An `"error:unsubscribe"` is emitted if there is no content topic subscription to unsubscribe from, or ongoing content topic subscription attempt to cancel.
|
||||
|
||||
Examples of irremediable failures are:
|
||||
|
||||
- Invalid content topic format
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user