Interface SubjectNameStrategy
- All Superinterfaces:
org.apache.kafka.common.Configurable
- All Known Implementing Classes:
RecordNameStrategy,TopicNameStrategy,TopicRecordNameStrategy
public interface SubjectNameStrategy
extends org.apache.kafka.common.Configurable
A
SubjectNameStrategy is used by the serializer to determine
the subject name under which the event record schemas should be registered
in the schema registry. The default is TopicNameStrategy.-
Method Summary
Modifier and TypeMethodDescriptionsubjectName(String topic, boolean isKey, ParsedSchema schema) For a given topic and message, returns the subject name under which the schema should be registered in the schema registry.default booleanWhether the strategy depends on the schema.Methods inherited from interface org.apache.kafka.common.Configurable
configure
-
Method Details
-
usesSchema
default boolean usesSchema()Whether the strategy depends on the schema.- Returns:
- Whether the strategy depends on the schema.
-
subjectName
For a given topic and message, returns the subject name under which the schema should be registered in the schema registry.- Parameters:
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 schema of the record being serialized/deserialized- Returns:
- The subject name under which the schema should be registered.
-