T- the type of values being serialized
@PublicEvolving public interface KafkaSerializationSchema<T> extends Serializable
KafkaSerializationSchemadefines how to serialize values of type
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|
Initialization method for the schema.
Serializes given element and returns it as a
default void open(SerializationSchema.InitializationContext context) throws Exception
serialize(Object, Long)and thus suitable for one time setup work.
SerializationSchema.InitializationContext can be used to access
additional features such as e.g. registering user metrics.
context- Contextual information that can be used during initialization.
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.