public final class GenericKafkaEgressSerializer extends java.lang.Object implements KafkaEgressSerializer<TypedValue>
KafkaEgressSerializer
used solely by Kafka egresses bound by GenericKafkaEgressBinderV1
.
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(TypedValue message)
Serializes given element and returns it as a
ProducerRecord . |
public org.apache.kafka.clients.producer.ProducerRecord<byte[],byte[]> serialize(TypedValue message)
KafkaEgressSerializer
ProducerRecord
.serialize
in interface KafkaEgressSerializer<TypedValue>
message
- element to be serializedProducerRecord
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.