[Spark][kafka]kafka 生产者,消费者 互动例子
[Spark][kafka]kafka 生产者,消费者 互动例子 # pwd /usr/local/kafka_2.11-0.10.0.1/bin 创建topic: # ./kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic device_status WARNING: Due to limitations in metric names, topics with a period ('.') or underscore ('_') could collide. To avoid issues it is best to use either, but not both. Created topic "device_status". # 查看topic: # ./kafka-topics.sh --list --zookeeper localhost:2181 device_status # 生产者生成消息: # ./kafka-console...