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

后端 未结 8 1574
南旧
南旧 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:44

    You need to add the SLF4j logging implementation. if you are using maven as the build tool try adding this following to your pom.xml and see if it works ..

        
          org.slf4j
          slf4j-log4j12
          1.7.5
        
    

提交回复
热议问题