卡夫卡消费者没有显示消息?

时间:2018-06-09 12:17:51

标签: apache-kafka

我使用以下命令创建了新主题'rahul':

bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic rahul
Created topic "rahul". 

我还用

重新检查了主题
bin/kafka-topics.sh --list --zookeeper localhost:2181

__ consumer_offsets     rahhy     rahul`

现在开始制作人:

bin/kafka-console-producer.sh --broker-list localhost:9092 --topic rahul
hey

喜     喂

但是,当消费者有时间显示消息时:没有什么

no msg retrival in consumer

1 个答案:

答案 0 :(得分:3)

从Kafka 0.9开始,您不使用Zookeeper进行消费或生产

尝试kafka-console-consumer --topic rahul --bootstrap-server localhost:9092

通过检查主题分区的偏移量是否发生了变化,还有其他方法可以检查发送给Kafka的消息using GetOffsetShell

相关问题