美文网首页
centos下安装、启动、测试kafka

centos下安装、启动、测试kafka

作者: 与飞 | 来源:发表于2019-06-18 09:08 被阅读0次

下载kafka:

wget http://mirrors.tuna.tsinghua.edu.cn/apache/kafka/2.2.0/kafka_2.12-2.2.0.tgz

  842  tar zxvf kafka_2.12-2.2.0.tgz

  844  cd  kafka_2.12-2.2.0/

  846  kafka_2.12-2.2.0 kafka_2.12-2.2.0 kafka_2.12-2.2.0

  847  kafka_2.12-2.2.0/libs/osgi-resource-locator-1.0.1.jar

启动

 /opt/kafka_2.12-2.2.0/bin/kafka-server-start.sh config/server.properties &

注册主题:

/opt/kafka_2.12-2.2.0/bin/kafka-console-producer.sh --broker-list 192.168.153.118:9092 --topic test

启动生产者:

 /opt/kafka_2.12-2.2.0/bin/kafka-console-producer.sh --broker-list 127.0.0.1:9092 --topic test

启动消费者:

/opt/kafka_2.12-2.2.0/bin/kafka-console-consumer.sh --topic test --bootstrap-server 127.0.0.1:9092 --from-beginning

相关文章

网友评论

      本文标题:centos下安装、启动、测试kafka

      本文链接:https://www.haomeiwen.com/subject/rskxqctx.html