Class PartitionKeyExtensionInterceptor

java.lang.Object
io.cloudevents.kafka.PartitionKeyExtensionInterceptor
All Implemented Interfaces:
AutoCloseable, ProducerInterceptor<Object,io.cloudevents.CloudEvent>, Configurable

public class PartitionKeyExtensionInterceptor extends Object implements ProducerInterceptor<Object,io.cloudevents.CloudEvent>
This ProducerInterceptor implements the partitioning extension, as described in the CloudEvents Kafka specification.

When using in your KafkaProducer, it will pick the partitionkey extension from the event and will set it as record key. If the extension is missing, It won't replace the key from the original record.