Skip to content

GH-2985: Add Kafka Listener Container Customizer interfaces and docum… #3015

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

sobychacko
Copy link
Contributor

…entation

Resolves #2985

This commit introduces new customization options for Kafka listener containers in Spring Cloud Stream, along with comprehensive documentation:

  • Add KafkaListenerContainerCustomizer interface for Kafka-specific customization with access to extended consumer properties
  • Extend ListenerContainerWithDlqAndRetryCustomizer to include access to extended consumer properties
  • Update KafkaMessageChannelBinder to support the new customizer interfaces
  • Implement KafkaListenerContainerCustomizerTests for integration testing
  • Add detailed AsciiDoc reference documentation explaining the purpose, usage, and hierarchy of these customizer interfaces:
    • ListenerContainerCustomizer (existing)
    • KafkaListenerContainerCustomizer (new)
    • ListenerContainerWithDlqAndRetryCustomizer (extended)
  • Update navigation to include the new documentation

These changes enhance the flexibility and configurability of Kafka consumer endpoints in Spring Cloud Stream applications, allowing users to fine-tune their listener containers based on specific requirements and scenarios, with improved access to Kafka-specific properties.

…es and documentation

Resolves spring-cloud#2985

This commit introduces new customization options for Kafka listener containers
in Spring Cloud Stream, along with comprehensive documentation:

- Add KafkaListenerContainerCustomizer interface for Kafka-specific customization
  with access to extended consumer properties
- Extend ListenerContainerWithDlqAndRetryCustomizer to include access to
  extended consumer properties
- Update KafkaMessageChannelBinder to support the new customizer interfaces
- Implement KafkaListenerContainerCustomizerTests for integration testing
- Add detailed AsciiDoc reference documentation explaining the purpose,
  usage, and hierarchy of these customizer interfaces:
  * ListenerContainerCustomizer (existing)
  * KafkaListenerContainerCustomizer (new)
  * ListenerContainerWithDlqAndRetryCustomizer (extended)
- Update navigation to include the new documentation

These changes enhance the flexibility and configurability of Kafka consumer
endpoints in Spring Cloud Stream applications, allowing users to fine-tune
their listener containers based on specific requirements and scenarios,
with improved access to Kafka-specific properties.
@EmbeddedKafka(partitions = 1, topics = "test-topic")
class KafkaListenerContainerCustomizerTests {

@Autowired

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could use the JSR-250 @resource annotation (jakarta.annotation.Resource)
https://docs.spring.io/spring-framework/reference/core/beans/annotation-config/resource.html

@olegz olegz merged commit eea905f into spring-cloud:main Oct 7, 2024
1 check passed
@olegz olegz added this to the 4.2.0-M2 milestone Oct 7, 2024
@olegz olegz added the feature label Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] In KafkaMessageChannelBinder pass the extendedConsumerProperties as an argument to ListenerContainerWithDlqAndRetryCustomizer
3 participants