TechHelper icon
TechHelper icon

Kafka Commands Quick Reference

Create kafka topic
bin/ --bootstrap-server <bootstrap-servers> --create --replication-factor 3 --partitions 3 --topic <topic>
List all available kafka topics
bin/ --bootstrap-server <bootstrap-servers> --list
Alter or modify topic partitions
bin/ --bootstrap-server <bootstrap-servers> --alter --topic <topic-name> --partitions 6
Send messages to kafka topic
bin/ --broker-list <bootstrap-servers> --topic <topic-name>
Changing the retention period for a topic
bin/ --bootstrap-server <bootstrap-servers> --alter --topic <topic-name> config*
Deleting a Kafka topic
bin/ --bootstrap-server <bootstrap-servers> --delete --topic <topic-name>
Consume messages or listen to kafka topic
bin/ --bootstrap-server <bootstrap-servers> --topic <topic-name>
Consume messages from topic with group
bin/ --topic <topic-name> --bootstrap-server <bootstrap-servers> --group <group-name>
Consume messages from the beginning of topic with group
bin/ --topic <topic-name> --bootstrap-server <bootstrap-servers> --group <group-name> --from-beginning
Consume messages with header and keys
bin/ --bootstrap-server <bootstrap-servers> --topic <topic-name> --property print.key=true --property print.headers=true --property print.timestamp=true

Commands Cheat Sheet

A vast collection of cheatsheets from popular tools and technologies with quick search functionlity and customizability


Search for any commands from the list of tools and technologies as a whole from the All section or dedicated sections for each tool.


Cheat sheets or commands from Docker, Kubernetes, Kafka, Redis, Git, Curl, SSH & SCP, Helm are provided. More will be added shorly.


The command subsection is provided on the top right corner

Add new commands

Add new commands by clicking on the "Add New Command" button. In the wizard which opens up, select any exisitng categories or type (and press enter) to add new categories. Add subsections if needed in the next step. In the next step, add a meaningful description of the command which would help in searching. In the final step, enter the command you want to save.
Newly created categories would be added as buttons along with the existing categories.

Copy Command

You can copy the command to clipboard by clicking on the Copy button.

Show more

By default 10 query results are shown in the page. If more are present, the Show More button is displayed and on clicking, the entire results are shown.

techHelperFree tool box for developers and testers

Copyright © 2024 TechHelper. All Rights Reserved.