io.quarkus.kafka.client.serialization.JsonObjectSerializer 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.json.JsonObject;
/**
* Kafka serializer for raw bytes in a buffer
*/
public class JsonObjectSerializer implements Serializer {
@Override
public byte[] serialize(String topic, JsonObject data) {
if (data == null)
return null;
return data.encode().getBytes();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy