Skip to content

KafkaListenerContainerCustomizer should implement ListenerContainerCustomizer’s only method #3120

@DidierLoiseau

Description

@DidierLoiseau

Describe the issue
KafkaListenerContainerCustomizer extends ListenerContainerCustomizer, but without overriding its only method, forcing all implementations to

  • declare a class to implement it (cannot use a lambda to benefit from the additional parameter)
  • also provide a no-op implementation of ListenerContainerCustomizer.configure() (since it will never be called)

It would be better to provide a default implementation for it instead, like ListenerContainerWithDlqAndRetryCustomizer does. Moreover, KafkaListenerContainerCustomizer.configure() shouldn’t delegate to ListenerContainerCustomizer.configure() since there is no point in implementing KafkaListenerContainerCustomizer if you don’t override it.

Version of the framework: 4.2.1
Expected behavior: be able to implement KafkaListenerContainerCustomizer with a lambda that gets the additional ExtendedConsumerProperties parameter.

Additional context
This interface was introduced in #3015, in the scope of #2985

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions