public final class GenericKafkaEgressSerializer extends java.lang.Object implements KafkaEgressSerializer<com.google.protobuf.Any>
KafkaEgressSerializer
used solely by sinks provided by the GenericKafkaSinkProvider
.
This serializer expects Protobuf messages of type KafkaProducerRecord
, and simply
transforms those into Kafka's ProducerRecord
.
Constructor and Description |
---|
GenericKafkaEgressSerializer() |
Modifier and Type | Method and Description |
---|---|
org.apache.kafka.clients.producer.ProducerRecord<byte[],byte[]> |
serialize(com.google.protobuf.Any any)
Serializes given element and returns it as a
ProducerRecord . |
public org.apache.kafka.clients.producer.ProducerRecord<byte[],byte[]> serialize(com.google.protobuf.Any any)
KafkaEgressSerializer
ProducerRecord
.serialize
in interface KafkaEgressSerializer<com.google.protobuf.Any>
any
- element to be serializedProducerRecord
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.