Skip to content

Programatically adding kafka consumers #321

@ckosmowski

Description

@ckosmowski

The use of @KafkaListener annotation is very convenient if we use the micronaut-kafka api directly. However if we want so provide our own classes that offer pre-configured kafka consumers we would have to implement the poll loop ourselfs allthough all the beautiful code is already there in KafkaConsumerProcessor.

I'd like to suggest a feature where we would be able to add a preconfigured kafkaConsumer to KafkaConsumerProcessor that reuses the code that is already there in the process() method but takes the configuration that is handed as parameters instead as the annotation information.

As a more specific example we'd like to be able to have a KafkaListener where offsetStrategies and all the parameters are configured, also the KafkaListenerException handler is set properly. The User (i.E. Developers of other teams) should then be able to just specify a topic, a groupId and how they'd like to process the messages. They shouln't care for committing or resetting offsets in case of an Exception or such things. This would be a great benefit for us.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions