This tool helps to read data from standard input and publish it to Kafka. Option Description ------ ----------- --batch-size The buffer size in bytes allocated for a partition. When records are received which are smaller than this size the producer will attempt to optimistically group them together until this size is reached. This is the option to control batch.size in producer configs. Please note that this option will be replaced if max- partition-memory-bytes is also set. (default: 16384) --bootstrap-server The broker list string in the form HOST1:PORT1,HOST2:PORT2. --command-config Producer config properties file. Note that [command-property] takes precedence over this config. --command-property key=value. --compression-codec [String: The compression codec: either 'none', compression-codec] 'gzip', 'snappy', 'lz4', or 'zstd'. If specified without value, then it defaults to 'gzip' --help Print usage information. --line-reader The class name of the class to use for reading lines from standard in. By default each line is read as a separate message. (default: org. apache.kafka.tools.LineMessageReader) --max-block-ms block for during a send request. (default: 60000) --max-memory-bytes to buffer records waiting to be sent to the server. This is the option to control `buffer.memory` in producer configs. (default: 33554432) --max-partition-memory-bytes allocated for a partition. When records are received which are smaller than this size the producer will attempt to optimistically group them together until this size is reached. This is the option to control batch.size in producer configs. This option will be removed in Apache Kafka 5.0. Use --batch- size instead. (default: 16384) --message-send-max-retries Brokers can fail receiving the message for multiple reasons, and being unavailable transiently is just one of them. This property specifies the number of retries before the producer give up and drop this message. This is the option to control `retries` in producer configs. (default: 3) --metadata-expiry-ms after which we force a refresh of metadata even if we haven't seen any leadership changes. This is the option to control `metadata.max.age. ms` in producer configs. (default: 300000) --producer-property properties in the form key=value. This option will be removed in a future version. Use --command- property instead. --producer.config (DEPRECATED) Producer config properties file. Note that [command- property] takes precedence over this config. This option will be removed in a future version. Use --command- config instead. --property (DEPRECATED) A mechanism to pass user- defined properties in the form key=value to the message reader. This allows custom configuration for a user-defined message reader. Default properties include: parse.key=false parse.headers=false ignore.error=false key.separator=\t headers.delimiter=\t headers.separator=, headers.key.separator=: null.marker= When set, any fields (key, value and headers) equal to this will be replaced by null Default parsing pattern when: parse.headers=true and parse.key=true: "h1:v1,h2:v2...\tkey\tvalue" parse.key=true: "key\tvalue" parse.headers=true: "h1:v1,h2:v2...\tvalue" This option will be removed in a future version. Use --reader- property instead. --reader-config Config properties file for the message reader. Note that [reader-property] takes precedence over this config. --reader-property A mechanism to pass user-defined properties in the form key=value to the message reader. This allows custom configuration for a user- defined message reader. Default properties include: parse.key=false parse.headers=false ignore.error=false key.separator=\t headers.delimiter=\t headers.separator=, headers.key.separator=: null.marker= When set, any fields (key, value and headers) equal to this will be replaced by null Default parsing pattern when: parse.headers=true and parse.key=true: "h1:v1,h2:v2...\tkey\tvalue" parse.key=true: "key\tvalue" parse.headers=true: "h1:v1,h2:v2...\tvalue" --request-required-acks requests (default: -1) --request-timeout-ms requests. Value must be non-negative and non-zero. (default: 1500) --retry-backoff-ms Before each retry, the producer refreshes the metadata of relevant topics. Since leader election takes a bit of time, this property specifies the amount of time that the producer waits before refreshing the metadata. This is the option to control `retry.backoff.ms` in producer configs. (default: 100) --socket-buffer-size The size of the tcp RECV size. This is the option to control `send.buffer. bytes` in producer configs. (default: 102400) --sync If set message send requests to the brokers are synchronously, one at a time as they arrive. --timeout 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. This is the option to control `linger.ms` in producer configs. (default: 1000) --topic REQUIRED: The topic name to produce messages to. --version Display Kafka version.