Skip to content

Commit

Permalink
chore: tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
chris13524 authored Feb 16, 2024
1 parent 939ffb7 commit 51af6b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/specs/servers/relay/relay-webhooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ Webhooks can be setup to trigger on one or more of these events. Available statu
- `queued` & `subscriber`: The client is subscribed to the message, but because it does not have a websocket connection open to receive the message immediately, the message has been stored in the mailbox instead.
- `delivered` & `subscriber`: The client received the message by being connected via websocket when the message was published, connected to the websocket and received the message from the mailbox, or called `irn_fetchMessages` or `irn_batchFetchMessages`.

If a watched client never receives the message, the message will persist in the mailbox for the TTL of the message. So if webhooks are exclusively used to deliver messages to the watched client, rather than another method (such as websocket or `irn_fetchMessages`) then it is considered a best practice to pair this with the usage of the [`irn_batchReceive`](./relay-server-rpc.md#batch-receive) RPC method to clear the mailbox of all messages so it doesn't consume resources on the relay unnecessarily.
If a watched client never receives the message (such as with a websocket or `irn_fetchMessages`), then as usual, the message will persist in the mailbox for the TTL of the message. So if webhooks are exclusively used to deliver messages to the watched client then it is considered a best practice to pair the use of webhooks with the usage of the [`irn_batchReceive`](./relay-server-rpc.md#batch-receive) RPC method. This will ensure that the mailbox is cleared of all messages so it doesn't consume resources on the relay unnecessarily.

0 comments on commit 51af6b6

Please sign in to comment.