Skip to content

Provide a way to define a ContainerCustomizer per KafkaListener #2825

@frosiere

Description

@frosiere

Following https://stackoverflow.com/questions/77193702/consumerrebalancelistener-and-or-containerproperties-override-per-container,

Through a new property on the KafkaListener annotation, it should be possible to specify the bean name of the ContainerCustomizer associated to the listener.

@KafkaListener(... containerCustomizer="myContainerCustomizerBeanName" ...)
void on(ConsumerRecords records) {
...

If provided, this customizer would override the default factory customizer.

See KafkaListenerAnnotationBeanPostProcessor and KafkaListenerEndpoint for internal details.

Would be great to have this feature on both Spring Kafka 2.9.x and 3.0.x

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions