Advocate Plumbing ↗️ CNCF Graduated App Definition and Development / Streaming & Messaging

Technology Guide

CloudEvents

License: Apache-2.0

CloudEvents Logo

Field Guide

Complete Guide

CloudEvents is a specification — not a piece of software — that defines a common envelope for describing event data. Every event has a small set of required attributes (id, source, specversion, type) and optional ones (subject, time, datacontenttype, dataschema), plus an opaque data payload. That’s it. The whole spec fits in a short document; the value is that any producer and any consumer can agree on how to identify, route, and deduplicate an event without negotiating a bespoke schema.

The spec defines bindings for how events are carried over different protocols: HTTP (binary mode puts attributes in headers, structured mode puts the whole envelope in the body), Kafka (headers + key), AMQP, MQTT, NATS, and WebSockets. It also defines a JSON format for serialization and extensions like partitionkey, traceparent (W3C Trace Context), and sequence. Reference SDKs exist for Go, Java, JavaScript, Python, C#, Rust, Ruby, and PHP.

CloudEvents is the event format used by Knative Eventing, Argo Events, AWS EventBridge (for partner events), Azure Event Grid, Google Eventarc, and essentially every CNCF project that emits events. It graduated from the CNCF in January 2024. Adopting it costs almost nothing — you set a few headers on an HTTP POST — and it pays off the first time you need to route events through a broker or build a consumer that isn’t tightly coupled to one producer’s schema. If you’re designing a service that emits events, there’s no good reason not to use it.

CNCF Project

Cloud Native Computing Foundation

Accepted: 2018-05-15
Incubating: 2019-10-24
Graduated: 2024-01-25

Community

Join the conversation

No articles found for CloudEvents yet. Check back soon!