Skip to content
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

Add configuration option to configure Kafka Listener's onlyLogRecordMetadata #24568

Closed
1 of 4 tasks
jjathman opened this issue Dec 19, 2020 · 6 comments
Closed
1 of 4 tasks
Assignees
Labels
status: first-timers-only An issue that can only be worked on by brand new contributors status: superseded An issue that has been superseded by another type: enhancement A general enhancement

Comments

@jjathman
Copy link

jjathman commented Dec 19, 2020

Hi, this is a first-timers-only issue. This means we've worked to make it more legible to folks who either haven't contributed to our codebase before, or even folks who haven't contributed to open source before.

If that's you, we're interested in helping you take the first step and can answer questions and help you out as you do. Note that we're especially interested in contributions from people from groups underrepresented in free and open source software!

If you have contributed before, consider leaving this one for someone new, and looking through our general ideal-for-contribution issues. Thanks!

Problem

When configuring a Kafka listener, it is possible to suppress the entire record from being written to the log when retries are being attempted.
This feature is not supported by the auto-configuration.

Solution

A new onlyLogRecordMetadata property should be added to KafkaProperties#Listener with the relevant description of the property on the field's javadoc.

Once the property is exposed, it should be mapped by the auto-configuration.
This happens in ConcurrentKafkaListenerContainerFactoryConfigurer#configureContainer

Finally, the existing tests in KafkaAutoConfigurationTests should be updated to execises the new spring.kafka.listener.only-log-record-metadata property (see listenerProperties).

Steps to Fix

  • Claim this issue with a comment below and ask any clarifying questions you need
  • Set up a repository locally following the Contributing Guidelines
  • Try to fix the issue following the steps above
  • Commit your changes and start a pull request.
@snicoll
Copy link
Member

snicoll commented Dec 19, 2020

Thanks for the suggestion.

paging @garyrussell as ContainerProperties is only used to configure the listener and I don't see any constant for that property in ConsumerConfig.

@snicoll snicoll added the status: waiting-for-feedback We need additional information before we can continue label Dec 19, 2020
@garyrussell
Copy link
Contributor

garyrussell commented Dec 21, 2020

It is, indeed, a spring.kafka.listener... property (on ContainerProperties) not spring.kafka.consumer....

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Dec 21, 2020
@snicoll snicoll added type: enhancement A general enhancement and removed status: feedback-provided Feedback has been provided status: waiting-for-triage An issue we've not yet triaged labels Dec 21, 2020
@snicoll snicoll added this to the 2.5.x milestone Dec 21, 2020
@snicoll snicoll added the status: first-timers-only An issue that can only be worked on by brand new contributors label Dec 21, 2020
@snicoll snicoll changed the title Add KafkaProperty for configuring ContainerProperties onlyLogRecordMetadata Add configuration option to configure Kafka Listener's onlyLogRecordMetadata Dec 21, 2020
@martindacos
Copy link
Contributor

I will take a look to my first issue :)

@snicoll
Copy link
Member

snicoll commented Dec 21, 2020

Alright @martindacos, the issue is yours and please let us know if you have any questions.

@martindacos
Copy link
Contributor

Hi @snicoll, the PR is ready for review. Let me know if I have to change something.

@mbhave
Copy link
Contributor

mbhave commented Dec 21, 2020

Closing in favor of #24582.

@mbhave mbhave closed this as completed Dec 21, 2020
@mbhave mbhave added the status: superseded An issue that has been superseded by another label Dec 21, 2020
@mbhave mbhave removed this from the 2.5.x milestone Dec 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: first-timers-only An issue that can only be worked on by brand new contributors status: superseded An issue that has been superseded by another type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

6 participants