event ID
A unique identifier the producer puts in each event so consumers can recognise the same event if it arrives twice.
In more detail
The ID must be stable: a retried or replayed copy carries the same one. Consumers store the IDs they have handled and skip repeats, or use the ID as the key of an upsert.
Example
{'event_id': 'evt-a', 'amount': 100}Related terms
- deduplication — Detecting and discarding repeated copies of the same message or request, usually by remembering identifiers already processed.
- idempotent consumer — A message or webhook handler that produces the same result whether it sees a message once or several times.
- event envelope — A standard outer structure that wraps an event's business payload with metadata such as event ID, type, version and time.
- identifier — A name or number that picks out exactly one thing, such as one container, one image or one database row.
Taught in
- Duplicates Are The Default — Apache Kafka & Event Streaming
- Idempotent Consumers And Deduplication Keys — Apache Kafka & Event Streaming
- Headers, Envelopes And Event Metadata — Apache Kafka & Event Streaming