Property CustomSubjectNameStrategy
CustomSubjectNameStrategy
Gets or sets how subjects are named, as a function (by default, the one of the configuration's
subject.name.strategy), for names that Confluent.SchemaRegistry.SubjectNameStrategy
can't express, such as a schema context (:.context:orders-value) or a team's prefix. It replaces the
configuration's subject.name.strategy. It is asked when a topic's schema is first written, and on every message
whose settings need the subject (use.latest.version and the others), so it should give the same subject
for the same topic and component.
public AsyncSubjectNameStrategyDelegate CustomSubjectNameStrategy { get; init; }
Property Value
- AsyncSubjectNameStrategyDelegate
Examples
new AvroSharpSerializer<Order>(registry) { CustomSubjectNameStrategy = (context, recordType) => Task.FromResult("billing." + context.Topic) }