3Kafka传输部署-创新互联

本文目标

部署Kafka,用来作为数据同步通道

创新互联主打移动网站、成都网站制作、做网站、网站改版、网络推广、网站维护、国际域名空间、等互联网信息服务,为各行业提供服务。在技术实力的保障下,我们为客户承诺稳定,放心的服务,根据网站的内容与功能再决定采用什么样的设计。最后,要实现符合网站需求的内容、功能与设计,我们还会规划稳定安全的技术方案做保障。启动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元起,快前往官网查看详情吧


本文名称:3Kafka传输部署-创新互联
本文地址:http://myzitong.com/article/ieheo.html