All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkus.kafka.client.serialization.JsonObjectSerializer Maven / Gradle / Ivy

There is a newer version: 3.17.5
Show newest version
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