Apache kafka useful CLI command

When we plan to use kafka then it is better to use confluent could for storage. It is lot easier to create topic and produce, consume stream of messages. Confluent cloud cloud has nice user interface to create topic and view the messages into that topic.

Following are some commands that we can run from the console to create, view and delete topic

View topic list

$ ccloud kafka topic list

Create new topic

$ ccloud kafka topic create <topic-name>

Delete a topic:

$ ccloud kafka topic delete <topic-name>

Consume messages from a topic:

$ ccloud kafka topic consume -b <topic-name>