'Micronaut Kafka Listener multi topic
I want to create a KakfaListener for several topics. All topics start with "masterdata", for example:
- masterdata.product
- masterdata.supplier
I try to implement a topic pattern but it doesn't work:
@KafkaListener(offsetReset = OffsetReset.EARLIEST)
static class AnalyticsListener {
@Topic(patterns="masterdata*")
void updateAnalytics(String item, String topic) {
received.add(topic);
}
}
Any suggestion?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
