Apache Kafka example error: Failed to send message after 3 tries

后端 未结 8 1585
南旧
南旧 2021-02-19 08:39

I am running this kafka producer example mentioned in its site

The code:

public class TestProducer {

    public static void main(String[] args) {
               


        
8条回答
  •  情话喂你
    2021-02-19 09:20

    Not sure but one possibility could be that the topic is not created on Kafka.

    Check the web UI for kafka and make sure the topic you are using i.e. "page_visits" to send the data is created there.

    If not it is very easy to create the topic using the GUI.

提交回复
热议问题