Kafka 0.10 Java Client TimeoutException: Batch containing 1 record(s) expired

前端 未结 3 1186
鱼传尺愫
鱼传尺愫 2021-02-15 16:02

I have a single node, multi (3) broker Zookeeper / Kafka setup. I am using the Kafka 0.10 Java client.

I wrote following simple remote (on a different Server than Kafka)

相关标签:
3条回答
  • 2021-02-15 16:28

    I encounter the same problems.

    You should change your kafka server.properties to specify ip address. eg:

    PLAINTEXT://YOUIP:9093

    if not, kafka will use hostname, if the producer can not get the host, it can not send message to kafka even if you can telnet them.

    0 讨论(0)
  • 2021-02-15 16:33

    This answer shares some insight. You can increase the request.timeout.ms producer configuration which will allow the client to queue batches for longer before expiring.

    You might also want to look into the batch.size and linger.ms configurations and find the optimal that works in your case.

    0 讨论(0)
  • 2021-02-15 16:45

    Port information in your BOOTSTRAP_SERVERS_CONFIG configuration is incorrect (MYIP:9092).

    As you've mentioned in server.properties as "PLAINTEXT://:9093, PLAINTEXT://:9093, PLAINTEXT://:9094".

    0 讨论(0)
提交回复
热议问题