Skip to content

Tank CLI

Mark Papadakis edited this page Aug 9, 2016 · 5 revisions

When you build Tank, you will also get tank-cli. This is a handy command-line interface to Tank brokers. You can use it to consume messages from Tank, produce messages to it, create new topics, run benchmarks, discover partitions, mirror messages across brokers, and in the future the functionality will be extended to support more commands.

You can use

$> ./tank-cli -h

to get started.

This is an example of using tank-cli to first produce some messages to a partition, and then consume those messages from Tank.

$> ./tank-cli  -t msgs -b :11011 set first second "third message"
$> ./tank-cli -t msgs -b :11011 get beginning

You can keep producing messages to Tank and if the second consume CLI command is running in another session, you will see those messages in your console output (tailing).

You tank-cli -t topic -b brokerEndpoint command -h to get more information about a command and its options. For example:

$> ./tank-cli -t msgs -b :11011 get -h
$> ./tank-cli -t msgs -b :11011 mirror -h
Clone this wiki locally