java.lang.Object
io.cloudevents.kafka.CloudEventSerializer
- All Implemented Interfaces:
Closeable,AutoCloseable,Serializer<io.cloudevents.CloudEvent>
Kafka
Serializer for CloudEvent.
To configure the encoding to use when serializing the event, you can use the ENCODING_CONFIG configuration key,
which accepts both a String or a variant of the enum Encoding. If you configure the Encoding as Encoding.STRUCTURED,
you MUST configure the EventFormat to use with EVENT_FORMAT_CONFIG, specifying a String
corresponding to the content type of the event format or specifying an instance of EventFormat.
-
Field Details
-
ENCODING_CONFIG
The configuration key for theEncodingto use when serializing the event.- See Also:
-
EVENT_FORMAT_CONFIG
The configuration key for theEventFormatto use when serializing the event in structured mode.- See Also:
-
-
Constructor Details
-
CloudEventSerializer
public CloudEventSerializer()
-
-
Method Details
-
configure
- Specified by:
configurein interfaceSerializer<io.cloudevents.CloudEvent>
-
serialize
- Specified by:
serializein interfaceSerializer<io.cloudevents.CloudEvent>
-
serialize
- Specified by:
serializein interfaceSerializer<io.cloudevents.CloudEvent>
-