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
CloudEventinside your application. - Serialize and deserialize
CloudEventback and forth using the CloudEvents Event Format, like Json. - Read and write
CloudEventback 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 CloudEvents, 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-apiModule providing theCloudEventand other base interfaces -
cloudevents-coreModule providingCloudEventimplementation,CloudEventBuilderto createCloudEvents programmatically,EventFormatto implement Event Formats,MessageReader/MessageWriterto implement Protocol bindings -
cloudevents-bomModule providing a bill of materials (BOM) for easier integration of CloudEvents in other projects -
cloudevents-json-jacksonImplementation of JSON Event format with Jackson -
cloudevents-protobufImplementation of Protobuf Event format using code generated from the standard protoc compiler. -
cloudevents-xmlImplementation of the XML Event Format. -
cloudevents-http-vertxImplementation of HTTP Protocol Binding with Vert.x Core -
cloudevents-http-restful-wsImplementation of HTTP Protocol Binding for Jakarta EE 8 Restful WS -
cloudevents-http-restful-ws-jakartaImplementation of HTTP Protocol Binding for Jakarta EE 9+ Restful WS -
cloudevents-http-basicGeneric implementation of HTTP Protocol Binding, primarily intended for integrators -
cloudevents-kafkaImplementation of Kafka Protocol Binding -
cloudevents-amqp-protonImplementation of AMQP Protocol Binding with Proton -
cloudevents-springIntegration ofCloudEventwith different Spring APIs, like MVC, WebFlux and Messaging
You can look at the latest published artifacts on Maven Central.