Java SDK for CloudEvents
Introduction
The Java SDK for CloudEvents is a collection of Java libraries to adopt CloudEvents in your Java application.
Using the Java SDK you can:
- Access, create and manipulate
CloudEvent
inside your application. - Serialize and deserialize
CloudEvent
back and forth using the CloudEvents Event Format, like Json. - Read and write
CloudEvent
back and forth to HTTP, Kafka, AMQP using the CloudEvents Protocol Binding implementations we provide for a wide range of well known Java frameworks/libraries.
Supported features
v0.3 | v1.0 | |
---|---|---|
CloudEvents Core | ||
AMQP Protocol Binding | ||
- Proton | ||
AVRO Event Format | ||
HTTP Protocol Binding | ||
- Vert.x | ||
- Jakarta Restful WS | ||
- Basic | ||
- Spring | ||
- http4k† | ||
JSON Event Format | ||
- Jackson | ||
Protobuf Event Format | ||
- Proto | ||
XML Event Format | ||
- XML | ||
Kafka Protocol Binding | ||
MQTT Protocol Binding | ||
NATS Protocol Binding | ||
Web hook |
† Source/artifacts hosted externally
Get Started
In order to start learning how to create, access and manipulate CloudEvent
s, check out the Core module documentation.
If you want to serialize and deserialize events and data back and forth to JSON, check out the Jackson Json module documentation.
Depending on the protocol and framework you’re using, if you want to send and receive CloudEvents, check out the dedicated pages:
- AMQP using Proton
- HTTP using Vert.x
- HTTP using Jakarta EE 8 - Jakarta Restful WS
- HTTP using Jakarta EE 9+ - Jakarta Restful WS
- HTTP using Spring
- HTTP using Jackson
- Kafka
If you’re interested in implementing an object conforming to the CloudEvent
and related interfaces, in order to interoperate with the other components of the SDK, check out the API module documentation.
You can also check out the Examples.
Modules
The CloudEvents SDK for Java is composed by several modules, each one providing a different feature from the different sub specs of CloudEvents specification:
-
cloudevents-api
Module providing theCloudEvent
and other base interfaces -
cloudevents-core
Module providingCloudEvent
implementation,CloudEventBuilder
to createCloudEvent
s programmatically,EventFormat
to implement Event Formats,MessageReader
/MessageWriter
to implement Protocol bindings -
cloudevents-bom
Module providing a bill of materials (BOM) for easier integration of CloudEvents in other projects -
cloudevents-json-jackson
Implementation of JSON Event format with Jackson -
cloudevents-protobuf
Implementation of Protobuf Event format using code generated from the standard protoc compiler. -
cloudevents-xml
Implementation of the XML Event Format. -
cloudevents-http-vertx
Implementation of HTTP Protocol Binding with Vert.x Core -
cloudevents-http-restful-ws
Implementation of HTTP Protocol Binding for Jakarta EE 8 Restful WS -
cloudevents-http-restful-ws-jakarta
Implementation of HTTP Protocol Binding for Jakarta EE 9+ Restful WS -
cloudevents-http-basic
Generic implementation of HTTP Protocol Binding, primarily intended for integrators -
cloudevents-kafka
Implementation of Kafka Protocol Binding -
cloudevents-amqp-proton
Implementation of AMQP Protocol Binding with Proton -
cloudevents-spring
Integration ofCloudEvent
with different Spring APIs, like MVC, WebFlux and Messaging
You can look at the latest published artifacts on Maven Central.