com.ibm.eventstreams.serdes

Class EventStreamsSerializer

  • All Implemented Interfaces:
    Closeable, AutoCloseable, org.apache.kafka.common.serialization.Serializer<org.apache.avro.generic.IndexedRecord>


    public class EventStreamsSerializer
    extends Object
    implements org.apache.kafka.common.serialization.Serializer<org.apache.avro.generic.IndexedRecord>
    The Event Streams serializer used by Kafka to convert generic or specific IndexedRecord objects to bytes, using schemas retrieved from the schema registry.
    • Constructor Detail

      • EventStreamsSerializer

        public EventStreamsSerializer()
    • Method Detail

      • configure

        public void configure(Map<String,?> configs,
                              boolean isKey)
        Specified by:
        configure in interface org.apache.kafka.common.serialization.Serializer<org.apache.avro.generic.IndexedRecord>
      • serialize

        public byte[] serialize(String topic,
                                org.apache.avro.generic.IndexedRecord data)
        Specified by:
        serialize in interface org.apache.kafka.common.serialization.Serializer<org.apache.avro.generic.IndexedRecord>
      • serialize

        public byte[] serialize(String topic,
                                org.apache.kafka.common.header.Headers headers,
                                org.apache.avro.generic.IndexedRecord data)
        Specified by:
        serialize in interface org.apache.kafka.common.serialization.Serializer<org.apache.avro.generic.IndexedRecord>
      • close

        public void close()
        Specified by:
        close in interface Closeable
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface org.apache.kafka.common.serialization.Serializer<org.apache.avro.generic.IndexedRecord>

Copyright © 2019. All rights reserved.