You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Status

Current state: Under Discussion

Discussion thread: here

JIRA:

Motivation

Tools kafka-console-producer.sh and kafka-console-consumer.sh have the multiple option --property to setup the MessageReader for Producer (defined by --line-reader) or the MessageFormatter for Consumer (defined by --formatter).

To setup the KafkaProducer/KafkaConsumer they have the multiple option --producer-property/--consumer-property and the config file option --consumer.config/--producer.config.

The idea is to offer the same possibility to use a config file option to setup the MessageReader/MessageFormatter.

It will be useful in different use cases:

  • when having multiple --property (the default reader can have up to 11 properties)
  • when passing properties with sensitive data (like schema.registry.ssl.truststrore.password for kafka-avro-console-producer) (could also be mitigated by using env vars)

Public Interfaces

Add an option:

  • --reader.config to tool kafka-console-producer.sh
  • --formatter.config to tool kafka-console-consumer.sh

As for --producer-property/--consumer-property with --consumer.config/--producer.config, any value from option --property would override value from config file.

Proposed Changes

Already implemented in pull request #12175.

Compatibility, Deprecation, and Migration Plan

No impact on existing users, just a new possibility available.

Test Plan

Launch the tools with the new config file option and check that properties from config file are applied to the reader/formatter.

Define a property in config file and in options and check that option override config file.

Rejected Alternatives

Use of generic option --config to avoid confusion in the purpose of this config file (but on the other hand, the current --property is quite generic already, maybe another KIP to change it).

  • No labels