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

io.atleon.schemaregistry.confluent.AvroRegistryRabbitMQBodyDeserializer Maven / Gradle / Ivy

There is a newer version: 0.28.3
Show newest version
package io.atleon.schemaregistry.confluent;

import io.atleon.rabbitmq.BodyDeserializer;
import io.atleon.rabbitmq.SerializedBody;

import java.util.Map;

/**
 * A {@link BodyDeserializer} that deserializes messages as avro payloads and looks up writer
 * schemas from a Confluent schema registry.
 *
 * @param  Type to be deserialized into
 */
public final class AvroRegistryRabbitMQBodyDeserializer implements BodyDeserializer {

    private final AvroRegistryDeserializer delegate = new AvroRegistryDeserializer<>();

    @Override
    public void configure(Map properties) {
        delegate.configure(properties);
    }

    @Override
    public T deserialize(SerializedBody data) {
        return delegate.deserialize(data.bytes());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy