Skip to content

Necessity of KafkaHandler on single method class #3807

@artembilan

Description

@artembilan

Discussed in #3804

Originally posted by vitorsalves March 15, 2025
Hi everyone,
Quick question, in a recent project i had to implement serval KafkaListener all with similar annotations and i wanted to combine them in to one (In my case it was @component, @ConditionalOnProperty and @KafkaListener). However even if all my classes only had a singular method i still had to add @KafkaHandler. While this isn't a huge issue, it does feel a bit redundant.

I understand very well the need of @KafkaHandler in a multimethod @KafkaListener, but in the case a singular method class it seems unnecessary. So i ask, is there a reason that in the case of a class-level annotated KafkaListener with only a singular method, KafkaHandler is still required?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions