Trigger real-time HTTP webhooks from Postgres changes with Sequin’s webhook sink. Learn about the batching and authentication strategies that Sequin offers.
false
.
When false
, each HTTP request will contain a single message object as its body. You can use a transform to customize the shape of this object.
When true
, messages will be batched according to the “Batch size” and “Batch timeout” settings, and the request body will be a JSON object containing one or more messages.
data
array. Your webhook handler should process all messages in the batch atomically.
For side effects like sending emails, you should probably set this to 1
. Otherwise, you risk your handler partially processing a batch then crashing. Then, when Sequin retries the batch, your handler will re-process the beginning of the batch.
For upserting to a database or store, set this to the number of rows you want to upsert in a single transaction.
Batching can increase throughput, but increases the payload size of each request.
data
field, which is an array of messages.
content-encoding: gzip
header to your webhook sink configuration. This can be configured either as a header in the HTTP endpoint or via a routing function.
content-encoding: gzip
header is present. However, make sure to check your framework’s documentation for specific implementation details.2XX OK
response after successfully processing the received message or batch of messages. Sequin will consider any response code outside the range of 200
to 299
a failure, and will mark the message(s) for re-delivery.
Authorization
bearer token in its requests. To generate a secure token with openssl
, run:
200 OK
response from the webhook endpoint.1
, Sequin may include more than one message for the same group in a single request. For clarity, Sequin will never include more than the specified “Batch size” messages in a single request, but may include fewer based on the “Batch timeout”.
1
. You can click on a message to see more details, including the last error response received from your endpoint.