confluent local kafka topic create¶
Important
- 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 Install and Upgrade Confluent Platform.
Description¶
Create a Kafka topic.
confluent local kafka topic create <topic> [flags]
Tip
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>
export PATH="${CONFLUENT_HOME}/bin:$PATH"
Flags¶
--partitions uint32 Number of topic partitions.
--replication-factor uint32 Number of replicas.
--config strings A comma-separated list of "key=value" pairs, or path to a configuration file containing a newline-separated list of "key=value" pairs.
--if-not-exists Exit gracefully if topic already exists.
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).
Examples¶
Create a topic named “test” with specified configuration parameters.
confluent local kafka topic create test --config cleanup.policy=compact,compression.type=gzip
See Also¶
- confluent local kafka topic - Run Kafka topic related commands.