event envelope
A standard outer structure that wraps an event's business payload with metadata such as event ID, type, version and time.
In more detail
Unlike headers, envelope fields live inside the value and are versioned with it, so business logic can rely on them. Common fields are event_id, event_type, event_version, occurred_at and payload.
Example
{'event_id': 'evt-001', 'event_type': 'order.created', 'event_version': 1, 'payload': {...}}Related terms
- payload — The actual data a message carries, as opposed to the headers and framing around it.
- record header — A key and bytes-value pair attached to a record outside its value, used for metadata such as content type or a trace ID.
- event ID — A unique identifier the producer puts in each event so consumers can recognise the same event if it arrives twice.
- ISO 8601 date format — The international standard for writing dates and times as text, such as 2024-01-15T10:00:00Z.
Taught in
- Twelve Lines Instead Of Four Hundred — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- Headers, Envelopes And Event Metadata — Apache Kafka & Event Streaming