Home >Java >javaTutorial >Kafka Common Commands Quick Reference Manual: Essential for Efficient Work
Apache Kafka is a popular message queue service that can help you build high-throughput, low-latency applications program. If you need to use Kafka in your application, you need to be familiar with Kafka's various commands.
This article will provide you with an overview of Kafka commands to help you quickly improve your work efficiency.
kafka-console-producer
: This command allows you to send data to Kafka from the command line. kafka-producer
: This command allows you to send data to Kafka using the Java API. kafka-console-consumer
: This command allows you to read data from Kafka from the command line. kafka-consumer
: This command allows you to read data from Kafka using the Java API. kafka-topics
: This command allows you to manage topics in Kafka. kafka-brokers
: This command allows you to manage brokers in Kafka. kafka-admin
: This command allows you to manage a cluster in Kafka. kafka-cat
: This command allows you to view messages in Kafka. kafka-diff
: This command allows you to differentiate clusters in Kafka. kafka-mirror-topics
: This command allows you to mirror topics in Kafka to another cluster. kafka-configs
: This command allows you to manage the configuration files of the cluster in Kafka. bin/kafka-console-producer --broker-list localhost:9092 --producer-property parse.key=true --producer-property key.separator=, --producer-property print.key=true --producer-property value.serializer=StringEncoder --producer-property key.serializer=StringEncoder --producer-config config/producer.config --request-required-ACKS=1
bin/kafka-console-consumer --broker-list localhost:9092 --consumer-property auto.offset.reset=earlies --consumer-property group.id=my-consumer-group --consumer-property key.deserializer=StringDecoder --consumer-property value.deserializer=StringDecoder --consumer-config config/consumer.config --from-beginning --max-message-count 10
bin/kafka-topics --create --zookeeper localhost:2181 --replication-failover-replication-set 3 --replication-failover-max-retries 10 --replication-failover-backoff-ms 1000 --default-replication-factors 1 --num-replicas 1 --partitions 1 --describe --list --delete --assignment --authorized-operators
bin/kafka-brokers --describe --create-topics --delete-topics --add-replicas-to-broker --remove-replicas-from-broker --enable-controller --shutdown --update-config --config
bin/kafka-admin --create-topics --delete-topics --describe-topics --create-users --delete-users --describe-users --create-acls --delete-acls --describe-acls --describe-config --config
This article provides you with an overview of Kafka commands to help you quickly improve work efficiency. These commands help you manage topics, brokers, clusters, and data in Kafka.
If you want to know more about Kafka, you can refer to the official Kafka documentation.
The above is the detailed content of Kafka Common Commands Quick Reference Manual: Essential for Efficient Work. For more information, please follow other related articles on the PHP Chinese website!