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
Copy file name to clipboardExpand all lines: src/pages/docs/guides/chat/bring-own-database.mdx
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,8 +16,8 @@ We will explain each in detail, and provide code examples for each. This is an o
16
16
17
17
This article covers the following options:
18
18
19
-
1. Using [outbound webhooks](/docs/platform/integrations/webhooks). This can be a [HTTP endpoint](/docs/platform/integrations/webhooks/generic), [AWS Lambda](/docs/platform/integrations/webhooks/lambda),[Azure Function](/docs/platform/integrations/webhooks/azure), [Google Function](/docs/platform/integrations/webhooks/gcp-function) and others.
20
-
2. Using [outbound streaming](/docs/platform/integrations/streaming). Stream messages to your own [Kafka](/docs/platform/integrations/streaming/kafka), [Kinesis](/docs/platform/integrations/streaming/kinesis), [AMQP](/docs/platform/integrations/streaming/amqp), [Pulsar](/docs/platform/integrations/streaming/pulsar) or [SQS](/docs/platform/integrations/streaming/sqs).
19
+
1. Using [outbound webhooks](/docs/platform/integrations/webhooks). [HTTP endpoint](/docs/platform/integrations/webhooks/generic), [AWS Lambda](/docs/platform/integrations/webhooks/lambda), and others.
20
+
2. Using [outbound streaming](/docs/platform/integrations/streaming). Stream to your own [Kafka](/docs/platform/integrations/streaming/kafka), [Kinesis](/docs/platform/integrations/streaming/kinesis), and others.
21
21
3. Using an [Ably queue](/docs/platform/integrations/queues).
22
22
4. Publishing via your own servers.
23
23
5. Using the Chat History endpoint.
@@ -63,14 +63,15 @@ Ably can forward messages to your own system via a webhook. This is the simplest
63
63
64
64
Read the guide on [outbound webhooks](/docs/platform/integrations/webhooks) for more details on how to setup the webhook with Ably for the platform of your choice.
65
65
66
-
All webhook integrations allow you to use a regex filter on the channel name to control which channels the webhook should be triggered for. To enable the webhook to trigger for all chat rooms, use the `.*::\$chat$` regex. All chat rooms are backed by a channel suffixed with `::$chat`. For chat room `foo`the channel name is `foo::$chat`.
66
+
All webhook integrations allow you to use a regex filter on the channel name to control which channels the webhook should be triggered for. Use a common prefix in the name of chat rooms that you want to trigger a webhook for, and use the prefix as the filter.
67
67
68
68
Use `channel.message` as the event type.
69
69
70
70
You need to consider:
71
-
- Redundancy. In case of failure, Ably will retry delivering the message to your webhook, but only for a short period of time.
71
+
- Redundancy. In case of failure, Ably will retry delivering the message to your webhook, but only for a short period of time. You can see errors in the [`[meta]log` channel](/docs/platform/errors#meta).
72
72
- Ordering. Messages can arrive out-of-order. Mitigated by the fact that they are globally sortable by their `serial` and `version.serial`. In rare cases, this can cause inconsistencies for reaction summaries if those are of interest to you.
73
73
- Consistency. Missing webhook calls will lead to inconsistencies between your database and Ably, which can be difficult to resolve.
74
+
-[At-least-once delivery](/docs/platform/architecture/idempotency#protocol-support-for-exactly-once-delivery). You need to be able to handle duplicate messages. Deduplication can be done by checking `serial` and `version.serial`.
74
75
75
76
## Using outbound streaming
76
77
@@ -93,7 +94,7 @@ Ably ensures that each message is delivered to only one consumer even if multipl
93
94
Benefits of using an Ably queue:
94
95
95
96
- You can consume it from your servers, meaning overall this is fault-tolerant. Ably takes care of the complexity of maintaining a queue.
96
-
- You can use multiple queues and configure which channels go to which queue (use `.*::\$chat$`regex to match all chat rooms).
97
+
- You can use multiple queues and configure which channels go to which queue via regex filters on the channel name.
97
98
- If your systems suffer any downtime, you will not miss anything (up to the queue max size).
0 commit comments