kafka
主题topic---消息分类
FlinkSql实战项目之六十计算中的应用
kafka常用命令
创建消息
bin/kafka-topics.sh --create --zookeeper locahost:2181 --replication-factor 1 --partitions 1 --topic test2
启动生产者的客户端
bin/kafka-console-producer.sh --broker-list locahost:9092 --topic test2
启动消费者的客户端
bin/kafka-console-consumer.sh --bootstrao-server localhost:9092 --topic test2 --from-beginning
--from-beginning 从头开始消费消息队列中的数据
kafka常用命令
启动zookeeper
nohup bin/zookeeper -server-start.sh config/zookeeper.properties &
启动server
nohup /bin/kafka-server-start.sh config/server.properties &
查看topic
bin/kafa-topics.sh --list --zookeeper localhost:2181
创建一个topic
bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test
发送数据
bin/kafka-console-producer.sh --broker-list localhost:9092 --topic test
消费数据
bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic test --from-beginning
kafka常见命令
nohup相关
启动zookeeper
Kafka常用命令
启动zookeepernohup bin/zookeeper-server-start.sh config/zookeeper.properties.&
启动servernohup bin/kafka-server-start.sh sonfig/server.properties&
查看topicbin/kafka-topics.sh-list--zookeeper localhost2181
创建个topic bin/kafka-topics.sh--create--zookeeper localhost2181--replication-factor 1--partitions 1-topic
Kafka执行步骤及相关命令:
kafka常用命令
Kafka常用命令
启动zookeepernohup bin/zookeeper-server-start.sh config/zookeeper.properties.&
启动servernohup bin/kafka-server-start.sh sonfig/server.properties&
查看topicbin/kafka-topics.sh-list--zookeeper localhost2181
创建个topic bin/kafka-topics.sh--create--zookeeper localhost2181--replication-factor 1--partitions 1-topic
test
发送数据bin/kafka-console-producer.sh--broker-list localhost9092--topic test
消费数据bin/kafka-console-consumer.sh--bootstrap-server locallost:9092-topic test-from-beginning