gpt4 book ai didi

apache-kafka - Kafka 控制台生产者 - 向主题 : TimeoutException: Expiring 1 record 发送消息时出错

转载 作者:行者123 更新时间:2023-12-02 02:55:01 26 4
gpt4 key购买 nike

我有一个包含 3 个节点的 Confluent Platform Kafka 集群,一切似乎都工作正常,但是当使用控制台生成一些消息时,出现错误!

命令:

/opt/kafka/confluent-4.0.0/bin/kafka-console-producer --broker-list  109.169.xxx.xxx:9092 --topic sh

错误:

ERROR Error when sending message to topic sh with key: null, value: 1 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback) org.apache.kafka.common.errors.TimeoutException: Expiring 1 record(s) for sh-1: 1538 ms has passed since batch creation plus linger time

最佳答案

您可能会在高延迟连接时遇到此错误(请看您有 1.5 秒的时间)。 CLI 工作正常,并且比用 Java 编写同样简单的东西“更好”,因为 CLI 只是一个 Java 包装器。 Python 或 kafkacat 肯定不会那么冗长

console producer 的默认 batch size 是 200 条记录,我上次看过,所以如果你发送的数据少于这个,那么 batch 最终会过期

关于apache-kafka - Kafka 控制台生产者 - 向主题 : TimeoutException: Expiring 1 record 发送消息时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49876586/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com