重慶分公司,新征程啟航
為企業提供網站建設、域名注冊、服務器等服務
為企業提供網站建設、域名注冊、服務器等服務
部署Kafka,用來作為數據同步通道
tar xfz kafka_2.12-3.3.1.tgz
cd kafka_2.12-3.3.1/bin
./zookeeper-server-start.sh -daemon ../config/zookeeper.properties
./kafka-server-start.sh -daemon ../config/server.properties
創建topic./kafka-topics.sh --list --bootstrap-server 127.0.0.1:9092
[yinyx@localhost bin]$ ./kafka-topics.sh --bootstrap-server 127.0.0.1:9092 --create --topic yinyx
Created topic yinyx.
[yinyx@localhost bin]$ ./kafka-topics.sh --list --bootstrap-server 127.0.0.1:9092
yinyx
[yinyx@localhost bin]$ ./kafka-topics.sh --bootstrap-server 127.0.0.1:9092 --describe --topic yinyx
Topic: yinyx TopicId: 095NSZOWQ7uns2rtIt6J3A PartitionCount: 1 ReplicationFactor: 1 Configs:
Topic: yinyx Partition: 0 Leader: 0 Replicas: 0 Isr: 0
[yinyx@localhost bin]$
啟動消費[yinyx@localhost bin]$ ./kafka-console-consumer.sh --bootstrap-server 127.0.0.1:9092 --topic yinyx
1
你好
中國!
啟動生產[yinyx@localhost bin]$ ./kafka-console-producer.sh --bootstrap-server 127.0.0.1:9092 --topic yinyx
>1
>你好
>中國!
>
你是否還在尋找穩定的海外服務器提供商?創新互聯www.cdcxhl.cn海外機房具備T級流量清洗系統配攻擊溯源,準確流量調度確保服務器高可用性,企業級服務器適合批量采購,新人活動首月15元起,快前往官網查看詳情吧