surya rahul
surya rahul

Reputation: 883

kafka consumer not showing the messages?

I created the new topic 'rahul' with the following command :

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

I also re-checked the topics with

bin/kafka-topics.sh --list --zookeeper localhost:2181

__consumer_offsets rahhy rahul`

Now starting the producer:

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

hi hello

But when the time comes to consumer to show the messages: there is nothing

no msg retrival in consumer

Upvotes: 0

Views: 4483

Answers (1)

OneCricketeer
OneCricketeer

Reputation: 191894

As of Kafka 0.9, you don't use Zookeeper for consumption or production

Try kafka-console-consumer --topic rahul --bootstrap-server localhost:9092

There are other ways you can check messages were sent to Kafka - by checking that the offsets of the topic partitions have changed using GetOffsetShell

Upvotes: 3

Related Questions