Apache kafka useful CLI command

When we plan to use kafka then it is better to use confluent could for storage. It is a lot easier to create topics and produce, consume a stream of messages. Confluent cloud has a nice user interface to create topics 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>