Enum SubjectNameStrategy
Specifies the subject naming strategy for Schema Registry subjects.
public enum SubjectNameStrategy
- Extension Methods
Fields
RecordName = 1Subject is derived from the record type:
{namespace}.{type}.Allows multiple schemas per topic. Each message type has its own schema subject independent of the topic.
TopicName = 0Subject is derived from the topic name:
{topic}-value.This is the default Confluent strategy. All messages on the same topic must use the same schema (with compatible evolution).
TopicRecordName = 2Subject combines topic and record:
{topic}-{namespace}.{type}.Allows different schemas for the same type on different topics. Provides maximum flexibility at the cost of more subjects.
Remarks
The subject name uniquely identifies a schema in the Schema Registry. Different strategies determine how the subject is derived from the topic and message type.
For custom strategies, implement ISubjectNameStrategy and use
SubjectNameStrategy<TStrategy>() on the builder.