Class TopicNameStrategy
java.lang.Object
io.confluent.kafka.serializers.subject.TopicNameStrategy
- All Implemented Interfaces:
SubjectNameStrategy,org.apache.kafka.common.Configurable
Default
SubjectNameStrategy: for any messages published to
<topic>, the schema of the message key is registered under
the subject name <topic>-key, and the message value is registered
under the subject name <topic>-value.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsubjectName(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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.confluent.kafka.serializers.subject.strategy.SubjectNameStrategy
usesSchema
-
Constructor Details
-
TopicNameStrategy
public TopicNameStrategy()
-
-
Method Details
-
configure
- Specified by:
configurein interfaceorg.apache.kafka.common.Configurable
-
subjectName
Description copied from interface:SubjectNameStrategyFor a given topic and message, returns the subject name under which the schema should be registered in the schema registry.- Specified by:
subjectNamein interfaceSubjectNameStrategy- 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.
-