@FunctionalInterface public interface TopicNamer
TopicNamer ensures a consistent naming convention for these families of topics.
Modifier and Type | Method and Description |
---|---|
String |
apply(String topicType)
Create a full topic name for a topic type
|
static TopicNamer |
forPrefix(String topicPrefix,
String baseName)
Creates a topic namer using the prefix resource naming strategy.
|
static TopicNamer |
forStrategy(io.simplesource.kafka.api.ResourceNamingStrategy strategy,
String topicBaseName)
Creates a topic namer using a resource naming strategy.
|
String apply(String topicType)
topicType
- the topic typestatic TopicNamer forStrategy(io.simplesource.kafka.api.ResourceNamingStrategy strategy, String topicBaseName)
strategy
- the strategytopicBaseName
- the topic base namestatic TopicNamer forPrefix(String topicPrefix, String baseName)
topicType -> topicPrefix + "-" + baseName + "-" + topicType
topicPrefix
- the topic prefixbaseName
- the base nameCopyright © 2019. All rights reserved.