Class TopicNameGenerator
Namespace: Momentum.Extensions.Messaging.Kafka
Assembly: Momentum.Extensions.Messaging.Kafka.dll
csharp
public class TopicNameGenerator : ITopicNameGeneratorInheritance
Implements
Inherited Members
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
TopicNameGenerator(IHostEnvironment)
csharp
public TopicNameGenerator(IHostEnvironment environment)Parameters
environment IHostEnvironment
Methods
GetTopicName(Type, EventTopicAttribute)
Generates a fully qualified topic name based on environment and domain.
csharp
public string GetTopicName(Type messageType, EventTopicAttribute topicAttribute)Parameters
messageType Type
The integration event type.
topicAttribute EventTopicAttribute
The event topic attribute.
Returns
A topic name in the format: {env}.{domain}.{scope}.{topic}.