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

  • [x] 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.

Comment From: snicoll

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.

Comment From: garyrussell

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

Comment From: martindacos

I will take a look to my first issue :)

Comment From: snicoll

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

Comment From: martindacos

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

Comment From: mbhave

Closing in favor of #24582.