I am trying to send kafka message using simple java client , But I am facing connection issue.
Error : org.apache.kafka.common.errors.TimeoutException: Failed to update metadata after 60000 ms.
I have attached java producer client
I could able to connect broker
and listener property is PLAINTEXT://0.0.0.0:6667
Can any one let me what I am missing ?
and let me know any details you required.
@Gobi Subramani, I tested the code snippet that you attached and it works fine. You just need to make sure that you set correctly the topic name (KafkaClient.TOPIC in your code) and bootstrap servers (node field in your code).
To test your code on your local computer you must set the field node=localhost:9092. You can start a console consumer to verify that the code is running correctly using the command:
KAFKA_HOME/bin/kafka-console-consumer.sh --zookeeper localhost:2181 --from-beginning --topic'