À propos de l'utilisation de la ligne de commande Kafka

http://cloudurable.com/blog/kafka-tutorial-kafka-from-command-line/index.html

  1. Liste des sujets
bin/kafka-topics.sh --bootstrap-server localhost:9092 --list
  1. Créer un sujet
bin/kafka-topics.sh --create \
  --bootstrap-server localhost:9092 \
  --replication-factor 1 --partitions 2 \
  --topic ellis
  1. Supprimer le sujet
bin/kafka-topics.sh --bootstrap-server localhost:9092 --delete --topic topicname
  1. Liste des groupes
bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --list
  1. Afficher le décalage d'un groupe
bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --group voucher5 --describe
  1. Afficher les informations sur le sujet
bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic voucher5 --from-beginning --property print.headers=true
  1. Envoyer un message
bin/kafka-console-producer.sh \
    --bootstrap-server localhost:9092 \
    --topic my-topic 

Je suppose que tu aimes

Origine blog.csdn.net/weixin_43632687/article/details/124979979
conseillé
Classement