
运行成功,brokder对应的元数据

create topic(test)
配置执行应用的参数
--create --zookeeper cdh1:2181 --replication-factor 1 --partitions 1 --topic test

执行结果

topic对应的元数据

启动consumer
配置执行参数
--bootstrap-server localhost:9092 --from-beginning --topic test

启动之后

producer
配置执行应用的参数
--topic test --broker-list localhost:9092

启动之后
可以在控制台发送消息

消费者接受消息
