Support KafkaListener topicPattern
Hey yall. I have this use case where we're using a pattern instead of the topic names:
@KafkaListener(topicPattern="")
However, I get an error during start up and no topics are included in the UI.
Am I missing something or is this a bug?
2024-05-01T19:39:16.842+02:00 ERROR 70862 --- [Springwolf example project - Kafka] [ main] i.g.s.c.a.o.DefaultOperationsService : An error was encountered during operation scanning with io.github.springwolf.core.asyncapi.scanners.operations.SpringAnnotationOperationsScanner@30922f8d: Index 0 out of bounds for length 0
java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
Copied from Discord OP: @raphaeldelio
I wonder, whether the exception is thrown here: https://github.com/springwolf/springwolf-core/blob/master/springwolf-plugins%2Fspringwolf-kafka-plugin%2Fsrc%2Fmain%2Fjava%2Fio%2Fgithub%2Fspringwolf%2Fplugins%2Fkafka%2Fasyncapi%2Fscanners%2Fcommon%2FKafkaListenerUtil.java#L33 since you use topicpattern and not topics
The change is available in the latest release. 🎉
Thank you for the report/contribution and making Springwolf better!