confluent local kafka topic produce


The confluent local commands are intended for a single-node development environment and are not suitable for a production environment. The data that are produced are transient and are intended to be temporary. For production-ready workflows, see Confluent Platform.


Produce messages to a Kafka topic. Configuration and command guide:

When using this command, you cannot modify the message header, and the message header will not be printed out.

confluent local kafka topic produce <topic> [flags]


You must export the path as an environment variable for each terminal session, or set the path to your Confluent Platform installation in your shell profile. For example:

cat ~/.bash_profile
export CONFLUENT_HOME=<path-to-confluent>


--parse-key            Parse key from the message.
--delimiter string     The delimiter separating each key and value. (default ":")
--config strings       A comma-separated list of configuration overrides ("key=value") for the producer client. For a full list, see
--config-file string   The path to the configuration file for the producer client, in JSON or Avro format.

Global Flags

-h, --help            Show help for this command.
    --unsafe-trace    Equivalent to -vvvv, but also log HTTP requests and responses which might contain plaintext secrets.
-v, --verbose count   Increase verbosity (-v for warn, -vv for info, -vvv for debug, -vvvv for trace).


Produce message to topic “test” providing key.

confluent local kafka topic produce test --parse-key

See Also