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

io.apicurio.registry.serde.headers.HeadersHandler Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
package io.apicurio.registry.serde.headers;

import io.apicurio.registry.resolver.strategy.ArtifactReference;
import org.apache.kafka.common.header.Headers;

import java.util.Map;

/**
 * Common interface for headers handling when serializing/deserializing kafka records that have
 * {@link Headers}
 */
public interface HeadersHandler {

    default void configure(Map configs, boolean isKey) {
    }

    public void writeHeaders(Headers headers, ArtifactReference reference);

    /**
     * Reads the kafka message headers and returns an ArtifactReference that can contain or not information to
     * identify an Artifact in the registry.
     * 
     * @param headers
     * @return ArtifactReference
     */
    public ArtifactReference readHeaders(Headers headers);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy