![JAR search and dependency download from the Maven repository](/logo.png)
com.github.daniel.shuy.kafka.protobuf.serde.KafkaProtobufSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kafka-protobuf-serde Show documentation
Show all versions of kafka-protobuf-serde Show documentation
Serializer/Deserializer for Kafka to serialize/deserialize Protocol Buffers messages
The newest version!
package com.github.daniel.shuy.kafka.protobuf.serde;
import com.google.protobuf.MessageLite;
import java.util.Map;
import org.apache.kafka.common.serialization.Serializer;
/**
* Serializer for Kafka to serialize Protocol Buffers messages
*
* @param Protobuf message type
*/
public class KafkaProtobufSerializer implements Serializer {
@Override
public void configure(Map configs, boolean isKey) {
}
@Override
public byte[] serialize(String topic, T data) {
return data.toByteArray();
}
@Override
public void close() {
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy