Reputation: 135
Just new to kafka.
Today i was running some commands of kafka-console-producer.sh, i was using key value pair messages
bin/kafka-console-producer.sh --topic producer-demo --property "parse.key=true" --property "key.separator=:" --broker-list kafka1:9092
i am just curious where we can find producer property like i search
**"parse.key=true"**
and
**"key.separator=:"**
in
https://kafka.apache.org/documentation/#producerconfigs
There is no parameter like this is this custom parameter or predefined because i have to use this more and i can apply on this command
Upvotes: 0
Views: 8931
Reputation: 21396
For a handy reference, let me list down the available arguments for kafka-console-producer. I hope you are looking for something like this;
–batch-size <Integer: size>
:- We are defining the single batch for sending the Number of messages–broker-list <String: broker-list>
: -This is required options for the Kafka-console- producer, the broker list string in the form HOST: PORT–compression-codec [String: compression-codec]
:- This option is used to compress either ‘none’ or ‘gzip’.If specified without a value, then it defaults to ‘gzip’–Help:
– It will display the usage information.–metadata-expiry-ms<Long: metadata expiration interval>
:- The period in milliseconds after which we force a refresh of metadata even if we haven’t seen any leadership changes. (Default: 300000).–producer-property <String: producer_prop>
:-This parameter is used to set user-defined properties as key=value pair to the producer.–producer.config<String: config file>
:-This is the properties file containing all configuration related to the producer.–property <String: prop>
:- This attribute provides the liberty to pass user-defined properties to the message reader. These properties allow custom configuration and defined in the form of key=value.–request-required-acks<String: request required acks>
:- The required acks of the producer requests (default: 1)–request-timeout-ms<Integer: request timeout ms>
:- The ack timeout of the producer Value must be non-negative and non-zero (default: 1500).–Sync
: – If a set message sends, requests to the brokers are synchronous, one at a time as they arrive.–timeout <Integer: timeouts>
:- If set and the producer is running in asynchronous mode, this gives the maximum amount of time a message will queue awaiting sufficient batch size. The value is given in ms.–topic <String: topic>
:- this option is required .basically, the topic id to produce messages to.–Version
: -Display Kafka version.Upvotes: 0
Reputation: 1026
You can find out the all properties of kafka producer in the ProducerConfig class
Upvotes: 1
Reputation: 192023
Those parameters in particular are not Producer properties (which you pass with --producer-property
, and not --property
). They are CLI arguments that you can really only find in the source code.
Upvotes: 0