Package io.micronaut.pulsar.processor
Interface TopicResolver
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Process input string to determine real topic name for Apache Pulsar. Allows flexibility by avoiding requirement
to hardcode full topic names into the code. Useful in scenarios like multi-tenant applications.
- Since:
- 1.2.0
- Author:
- Haris Secic
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classSimple container class for describing resolved topics. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull TopicResolver.TopicResolvedextractTopic(io.micronaut.core.annotation.AnnotationValue<?> pulsarAnnotation, String forName) default StringgenerateIdFromMessagingClientName(String name, TopicResolver.TopicResolved topicResolved) static booleanisDynamicTenantInTopic(String topic) static StringreplaceTenantInTopic(String topic, String tenant)
-
Method Details
-
resolve
-
generateIdFromMessagingClientName
default String generateIdFromMessagingClientName(String name, TopicResolver.TopicResolved topicResolved) -
replaceTenantInTopic
-
isDynamicTenantInTopic
-
extractTopic
@NonNull static @NonNull TopicResolver.TopicResolved extractTopic(io.micronaut.core.annotation.AnnotationValue<?> pulsarAnnotation, String forName)
-