CLI
Topic
The topic subcommand is used to manage topics in a Tansu cluster.
Create
Create a topic:
tansu topic create --help
Usage: tansu topic create [OPTIONS] <NAME>
Arguments:
<NAME> The name of the topic to create
Options:
--broker <BROKER> Broker URL [default: tcp://localhost:9092]
--partitions <PARTITIONS> The number of partitions to create [default: 3]
--config <CONFIG>
-h, --help Print help
The topic subcommand will automatically load environment variables from a file named .env in the current directory or any of its parents.
Example
tansu topic create taxi
Delete
Delete an existing topic:
tansu topic delete --help
Usage: tansu topic delete [OPTIONS] <NAME>
Arguments:
<NAME> The name of the topic to delete
Options:
--broker <BROKER> Broker URL [default: tcp://localhost:9092]
-h, --help Print help
Example
tansu topic delete taxi
List
List existing topics:
Usage: tansu topic list [OPTIONS]
Options:
--broker <BROKER> Broker URL [default: tcp://localhost:9092]
-h, --help Print help
Example
tansu topic list