Table of Contents

Interface ISubjectNameStrategy

Namespace
Excalibur.Dispatch.Transport.Kafka
Assembly
Excalibur.Dispatch.Transport.Kafka.dll

Defines the strategy for generating Schema Registry subject names.

public interface ISubjectNameStrategy
Extension Methods

Remarks

The subject name is the unique identifier for a schema in the Schema Registry. Different strategies determine how the subject is derived from the topic and message type.

Built-in strategies:

  • Excalibur.Dispatch.Transport.Kafka.TopicNameStrategy: {topic}-value
  • Excalibur.Dispatch.Transport.Kafka.RecordNameStrategy: {namespace}.{type}
  • Excalibur.Dispatch.Transport.Kafka.TopicRecordNameStrategy: {topic}-{namespace}.{type}

Methods

GetKeySubject(string, Type)

Gets the subject name for a message key.

string GetKeySubject(string topic, Type keyType)

Parameters

topic string

The Kafka topic name.

keyType Type

The .NET type of the message key.

Returns

string

The Schema Registry subject name.

GetValueSubject(string, Type)

Gets the subject name for a message value.

string GetValueSubject(string topic, Type messageType)

Parameters

topic string

The Kafka topic name.

messageType Type

The .NET type being serialized.

Returns

string

The Schema Registry subject name.