zoukankan      html  css  js  c++  java
  • run kafka local

    Q: How to run kafka local
    download kafka http://kafka.apache.org/downloads

    start zookeeper
    $ bin/zookeeper-server-start.sh config/zookeeper.properties
    start kafka
    $ bin/kafka-server-start.sh config/server.properties
    or JMX_PORT=9988 bin/kafka-server-start.sh -daemon config/server.properties
    start kafka producer
    $ bin/kafka-console-producer.sh --broker-list localhost:9092 --topic topicName
    start kafka consumer
    $ bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic topicName
    bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic topicName --from-beginning --consumer-property group.id=test-group
    bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic topicName --from-beginning --consumer-property group.id=test-group --isolation-level read_committed
    bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic topicName --consumer-property group.id=test-group
    cat kafka-consumer-groups
    bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --list
    describe kafka-consumer-group
    bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group test-group
    describe topic
    bin/kafka-topics.sh --describe --zookeeper localhost:2181 --topic topicName
    delete topic
    bin/kafka-topics.sh --delete --zookeeper localhost:2181 --topic topicName
    create topic
    bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 3 --partitions 3 --topic topicName
  • 相关阅读:
    关于json解析和所需jar
    Solr初步使用
    Appium-desktop使用时的一些配置
    mac电脑安装和配置tomcat步骤
    maven-reportng插件依赖添加
    maven-surefire插件配置
    mac电脑的一些操作
    元素的多种延时等待(&页面的超时处理)
    Mac系统搭建java+selenium+testng环境
    爬虫简介与request模块
  • 原文地址:https://www.cnblogs.com/tonggc1668/p/15246740.html
Copyright © 2011-2022 走看看