zoukankan      html  css  js  c++  java
  • kafka常用指令

    查看消费组详情:
    ./bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group test-consumer-group
    
    查看topic详情:
    ./bin/kafka-topics.sh --topic mytopic --describe --bootstrap-server localhost:9092
    
    创建topic:
    bin/kafka-topics.sh --zookeeper localhost:2181 --create --topic mytopic --partitions 10 --replication-factor 3
    
    查看topic详情:
    bin/kafka-topics.sh --zookeeper localhost:2181 --desc --topic mytopic 
    
    修改partition数量:
    bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --partitions 10
    
    删除topic:
    server.properties ==> delete.topic.enable=true
    bin/kafka-topics.sh --zookeeper localhost:2181 --delete --topic mytopic 
    
    创建终端生产者:
    bin/kafka-console-producer.sh --broker-list localhost:9092 --topic mytopic 
    .inkafka-console-producer.bat --bootstrap-server localhost:9092 --topic my-topic
    
    创建终端消费者:
    bin/kafka-console-consumer.sh --zookeeper localhost:2181 --topic mytopic 
    
  • 相关阅读:
    MySQL数据库分页
    Spring MVC
    Spring框架
    Java学习计划(转载)
    开发用户注册模块
    Ajax技术
    Jodd Email 发送邮件
    DOM技术
    MD5加密
    final关键字的使用
  • 原文地址:https://www.cnblogs.com/cuiyuanhao/p/13410418.html
Copyright © 2011-2022 走看看