Skip to contentSkip to navigationSkip to topbar
On this page

Deduplication


Event Streams guarantees at-least-once delivery of events. You might receive duplicated events due to many reasons. If you want to discard duplicated events, you must deduplicate the events you receive.


At-least-once delivery

at-least-once-delivery page anchor

Event Streams guarantees at-least-once delivery of events. This means Twilio sends each event to your system at least once. However, we might send the same event more than once.


Twilio might send the same event multiple times due to many reasons, including but not limited to:

  • Retries due to customer errors
  • Incident remediation
  • Internal temporary errors

Two events are the same event if they have the same id. The id is a SID like EZ00000000000000000000000000000000. If you care about exactly-once delivery, you need to implement deduplication in the service that receives the events.

To deduplicate received events:

  • Check if you received another event with the same event id previously.
  • If you already received an event with the same id , discard it.
  • Otherwise, store the event id .
(information)

Info

If you use a webhook sink, return a success status code (200) when you discard a duplicate event. Otherwise, Event Streams will start sending retries due to customer errors.