T
- the type of values being serialized@PublicEvolving public interface KafkaSerializationSchema<T> extends Serializable
KafkaSerializationSchema
defines how to serialize values of type T
into ProducerRecords
.
Please also implement KafkaContextAware
if your serialization schema needs
information
about the available partitions and the number of parallel subtasks along with the subtask ID on
which the Kafka Producer is running.
Modifier and Type | Method and Description |
---|---|
org.apache.kafka.clients.producer.ProducerRecord<byte[],byte[]> |
serialize(T element,
Long timestamp)
Serializes given element and returns it as a
ProducerRecord . |
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.