io.quarkus.kafka.client.serialization.JsonObjectDeserializer 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.Deserializer;
import io.vertx.core.buffer.Buffer;
import io.vertx.core.json.JsonObject;
/**
* Kafka deserializer for raw bytes in a buffer
*/
public class JsonObjectDeserializer implements Deserializer {
@Override
public JsonObject deserialize(String topic, byte[] data) {
if (data == null)
return null;
return Buffer.buffer(data).toJsonObject();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy