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
Modifier and TypeInterfaceDescriptionstatic final class
Simple container class for describing resolved topics. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull TopicResolver.TopicResolved
extractTopic
(io.micronaut.core.annotation.AnnotationValue<?> pulsarAnnotation, String forName) default String
generateIdFromMessagingClientName
(String name, TopicResolver.TopicResolved topicResolved) static boolean
isDynamicTenantInTopic
(String topic) static String
replaceTenantInTopic
(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)
-