Class DefaultReferenceSubjectNameStrategy

java.lang.Object
io.confluent.kafka.serializers.subject.DefaultReferenceSubjectNameStrategy
All Implemented Interfaces:
ReferenceSubjectNameStrategy, org.apache.kafka.common.Configurable

public class DefaultReferenceSubjectNameStrategy extends Object implements ReferenceSubjectNameStrategy
Default ReferenceSubjectNameStrategy: simply uses the reference name as the subject name.
  • Constructor Details

    • DefaultReferenceSubjectNameStrategy

      public DefaultReferenceSubjectNameStrategy()
  • Method Details

    • configure

      public void configure(Map<String,?> config)
      Specified by:
      configure in interface org.apache.kafka.common.Configurable
    • subjectName

      public String subjectName(String refName, String topic, boolean isKey, ParsedSchema schema)
      Description copied from interface: ReferenceSubjectNameStrategy
      For a given reference name, topic, and message, returns the subject name under which the referenced schema should be registered in the schema registry.
      Specified by:
      subjectName in interface ReferenceSubjectNameStrategy
      Parameters:
      refName - The name of the reference.
      topic - The Kafka topic name to which the message is being published.
      isKey - True when encoding a message key, false for a message value.
      schema - The referenced schema.
      Returns:
      The subject name under which the referenced schema should be registered.