Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. https://github.com/cloudevents/spec

  2. https://github.com/cloudevents/sdk-java
  3. https://mvnrepository.com/artifact/io.cloudevents
  4. Examples : https://github.com/cloudevents/sdk-java/tree/main/examples/kafka/src/main/java/io/cloudevents/examples/kafka

Common Header Mapping

The table below shows how previously proposed headers should be mapped to pre-defined CNFC headers.

Before

After

CloudeEvent builder methodExample ValueNotes

eventId

id

.withId()
Mandatory

eventSource

source

.withSource()
Mandatory

N/A

specversion  (default 1.0)

.v1()1.0Mandatory  - This is the version of the cloud events

eventType

type

.withType()
Mandatory

eventTime

time

.withTime()
Optional

eventSchema

dataschema

.withDataSchema()

Optional  includes the version of the schema


datacontenttype
withDataContentType()
application/jsonOptional
eventCorrelationIdcorrelationid.withExtension()

Optional This will be part of the extensions field in the cloud events and all the restrictions of the attribute field naming applies to it.

i.e these fields will be in the small case.

This is marked as optional as it only applies to the event which has this fieldsome events.

eventdata.withData(json TBC)
Mandatory actual event/payload now would be under "data" field.

...