io.quarkus.kafka.client.serialization.BufferSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-kafka-client Show documentation
Show all versions of quarkus-kafka-client Show documentation
Connect to Apache Kafka with its native API
package io.quarkus.kafka.client.serialization;
import org.apache.kafka.common.serialization.Serializer;
import io.vertx.core.buffer.Buffer;
/**
* Kafka serializer for raw bytes in a buffer
*/
public class BufferSerializer implements Serializer {
@Override
public byte[] serialize(String topic, Buffer data) {
if (data == null)
return null;
return data.getBytes();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy