消费者未收到消息,kafka控制台,新的消费者api,Kafka 0.9 [英] Consumer not receiving messages, kafka console, new consumer api, Kafka 0.9

查看:125
本文介绍了消费者未收到消息,kafka控制台,新的消费者api,Kafka 0.9的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在针对Kafka 0.9.0.0进行 Kafka快速入门.

I am doing the Kafka Quickstart for Kafka 0.9.0.0.

我跑了,所以让动物园管理员在localhost:2181收听

I have zookeeper listening at localhost:2181 because I ran

bin/zookeeper-server-start.sh config/zookeeper.properties

我有一个经纪人在监听localhost:9092,因为我跑了

I have a single broker listening at localhost:9092 because I ran

bin/kafka-server-start.sh config/server.properties

我跑了,因为有一位制片人在主题"test"上发帖了

I have a producer posting to topic "test" because I ran

bin/kafka-console-producer.sh --broker-list localhost:9092 --topic test
yello
is this thing on?
let's try another
gimme more

当我运行旧的API使用者时,通过运行

When I run the old API consumer, it works by running

bin/kafka-console-consumer.sh --zookeeper localhost:2181 --topic test --from-beginning

但是,当我运行新的API使用者时,运行时我什么也没得到

However, when I run the new API consumer, I don't get anything when I run

bin/kafka-console-consumer.sh --new-consumer --topic test --from-beginning \
    --bootstrap-server localhost:9092

是否可以使用新api从控制台使用者订阅主题?我该如何解决?

Is it possible to subscribe to a topic from the console consumer using the new api? How can I fix it?

推荐答案

我在我的MAC盒中遇到了相同的控制台用户问题,即使用该命令时不使用任何消息

I my MAC box I was facing the same issue of console-consumer not consuming any messages when used the command

kafka-console-consumer --bootstrap-server localhost:9095 --from-beginning --topic my-replicated-topic

但是当我尝试

kafka-console-consumer --bootstrap-server localhost:9095 --from-beginning --topic my-replicated-topic --partition 0

它愉快地列出了发送的消息.这是Kafka 1.10.11中的错误吗?

It happily lists the messages sent. Is this a bug in Kafka 1.10.11?

这篇关于消费者未收到消息,kafka控制台,新的消费者api,Kafka 0.9的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆