I'm creating a publish method using Emitter<> And I'm trying to create a unit test for this method. I don't want to use the InMemoryConnector (as described in the quarkus doc) I want to use the actual kafka connector configured in my application.yaml (mp: messaging: outgoing: : connector: smallrye-kafka)
So I'm trying to create a consumer in my test class to consume data from the kafka broker. That's why I don't want to use the @Incoming annotation. Is there on other way to consume data from the kafka ?
You can check out the Kafka Companion test library which is easy to integrate into Quarkus tests. It provides a convenient API to produce and consume records from the Kafka broker and write assertions against consumed records.