Package com.hazelcast.jet.kafka
Class HazelcastKafkaAvroSerializer
java.lang.Object
com.hazelcast.jet.kafka.impl.AbstractHazelcastAvroSerde
com.hazelcast.jet.kafka.HazelcastKafkaAvroSerializer
- All Implemented Interfaces:
Closeable
,AutoCloseable
,org.apache.kafka.common.serialization.Serializer<org.apache.avro.generic.GenericRecord>
public class HazelcastKafkaAvroSerializer
extends com.hazelcast.jet.kafka.impl.AbstractHazelcastAvroSerde
implements org.apache.kafka.common.serialization.Serializer<org.apache.avro.generic.GenericRecord>
An Avro serializer for Kafka. Unlike
io.confluent.kafka.serializers.KafkaAvroSerializer
,
this serializer does not use a schema registry. Instead, it obtains the schema from mapping
options and use it for all messages. Consequently, the messages produced by this serializer
does not include a schema id (and also "magic byte").- Since:
- 5.4
- See Also:
-
Field Summary
Fields inherited from class com.hazelcast.jet.kafka.impl.AbstractHazelcastAvroSerde
OPTION_KEY_AVRO_SCHEMA, OPTION_VALUE_AVRO_SCHEMA
-
Constructor Summary
-
Method Summary
Methods inherited from class com.hazelcast.jet.kafka.impl.AbstractHazelcastAvroSerde
getSchema
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.kafka.common.serialization.Serializer
close, serialize
-
Constructor Details
-
HazelcastKafkaAvroSerializer
public HazelcastKafkaAvroSerializer()Constructor used by Kafka producer.
-
-
Method Details
-
configure
- Specified by:
configure
in interfaceorg.apache.kafka.common.serialization.Serializer<org.apache.avro.generic.GenericRecord>
-
serialize
- Specified by:
serialize
in interfaceorg.apache.kafka.common.serialization.Serializer<org.apache.avro.generic.GenericRecord>
-