Class JsonObjectSerializer

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

    public class JsonObjectSerializer
    extends Object
    implements org.apache.kafka.common.serialization.Serializer<JsonObject>
    Kafka serializer for raw bytes in a buffer
    • Constructor Detail

      • JsonObjectSerializer

        public JsonObjectSerializer()
    • Method Detail

      • configure

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

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

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