kafka
kafka copied to clipboard
KAFKA-14146: Config file option for MessageReader/MessageFormatter in ConsoleProducer/ConsoleConsumer (KIP-840)
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 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.
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.
@dajac KIP is now accepted. Next step is to validate this PR.
@zigarn Could you update the PR to reflect the latest version of the KIP? It looks like the argument names are not correct.
@dajac: code updated to reflect KIP, and also rebased.
@dajac: thanks for your review, I did most of the proposed fixes.
No problem, thanks for the review.