kafka icon indicating copy to clipboard operation
kafka copied to clipboard

KAFKA-14146: Config file option for MessageReader/MessageFormatter in ConsoleProducer/ConsoleConsumer (KIP-840)

Open zigarn opened this issue 3 years ago • 5 comments

KIP-840 KAFKA-14146

kafka-console-producer.sh & kafka-console-consumer.sh scripts have a --property that can be set multiple times. This PR allows to set those properties through a config file with --config instead of multiple --property options.

Committer Checklist (excluded from commit message)

  • [ ] Verify design and implementation
  • [ ] Verify test coverage and CI build status
  • [ ] Verify documentation (including upgrade notes)

zigarn avatar May 17 '22 16:05 zigarn

@zigarn Thanks for the PR. Adding a new command line argument requires a KIP. The process is described here: https://cwiki.apache.org/confluence/display/KAFKA/Kafka+Improvement+Proposals.

dajac avatar May 17 '22 17:05 dajac

Thanks @dajac, I'm starting the KIP process for this.

@dengziming, --consumer.config & --producer.config are config files for Producer & Consumer corresponding to the single property options --producer-property & --consumer-property. This new --config option is meant to handle the properties set by the --property option which is meant to setup the MessageReader for Producer (defined by --line-reader) or the MessageFormatter for Consumer (defined by --formatter). As the single property option is --property, I went to --config for coherence, but could be the less confusing --reader.config & --formatter.config (but then it would have been more coherent to have --reader-property & --formatter-property as single property options). Option --command-config in other tools is the config for the Admin Client, which is not the purpose here.

zigarn avatar May 18 '22 06:05 zigarn

@dajac KIP is now accepted. Next step is to validate this PR.

zigarn avatar Jul 07 '22 07:07 zigarn

@zigarn Could you update the PR to reflect the latest version of the KIP? It looks like the argument names are not correct.

dajac avatar Aug 16 '22 13:08 dajac

@dajac: code updated to reflect KIP, and also rebased.

zigarn avatar Aug 17 '22 06:08 zigarn

@dajac: thanks for your review, I did most of the proposed fixes.

zigarn avatar Sep 27 '22 12:09 zigarn

No problem, thanks for the review.

zigarn avatar Dec 02 '22 16:12 zigarn