Message not getting publised to consumer


#1

Apache Kafka :- Message not getting publised to consumer

[naphri6100@ip-172-31-38-146 ~]$ kafka-console-producer.sh --broker-list ip-172-31-20-247.ec2.internal:6667 --topic naphri

Message 1

[naphri6100@ip-172-31-38-146 ~]$ kafka-console-consumer.sh --zookeeper ip-172-31-35-141.ec2.internal:2181 --topic naphri–from-beginning
Using the ConsoleConsumer with old consumer is deprecated and will be removed in a future major release. Consider using the new consumer by passing [bootstrap-serv
er] instead of [zookeeper].

Command
zookeeper-client get /brokers/ids/0 not returing any broker IP


WatchedEvent state:SyncConnected type:None path:null
Node does not exist: /brokers/ids/0


#2

Quick observation:

“–topic naphri–from-beginning”

Shouldn’t there be a gap between naphri and “-from”?


#3

2 Points:-

[naphri6100@ip-172-31-38-146 ~]$ kafka-console-producer.sh --broker-list ip-172-31-20-247.ec2.internal:6667 --topic naphri

First Message
[2018-12-20 06:45:12,219] ERROR Error when sending message to topic naphri with key: null, value: 13 bytes with error: (org.apache.kafka.clients.producer.internal
s.ErrorLoggingCallback)
org.apache.kafka.common.errors.TimeoutException: Expiring 1 record(s) for naphri-0: 1548 ms has passed since batch creation plus linger time

Command
zookeeper-client get /brokers/ids/0 not returing any broker IP

Please help


#4

Find out about all available brokers using:

zookeeper-client ls /brokers/ids

For me it is showing:

[1003, 1002, 1001]

Then you can do either of the following to get the details:

  • zookeeper-client get /brokers/ids/1003
  • zookeeper-client get /brokers/ids/1002
  • zookeeper-client get /brokers/ids/1001