小编Pem*_*anZ的帖子

自上次追加以来,卡夫卡生产者发送的消息已过期 30003 毫秒

我正在使用 Kafka 0.10.1.1 并编写一个测试生产者,但在producer.send onCompletion回调中出现错误:

        producer.send(record, new Callback() {
        @Override
        public void onCompletion(RecordMetadata metadata, Exception e) {
            if (e != null){
                System.out.println(e.getMessage());
            }
        }
    });
Run Code Online (Sandbox Code Playgroud)

带有配置的生产者: timeout.ms=30000, linger.ms=5, batch.size=1000

收到以下错误消息:

自上次追加以来,由于 30004 毫秒,testtopic-2 的 1 条记录已过期

但是这个错误信息只是有时出现。制片人有时可以工作得很好。

producer apache-kafka

5
推荐指数
1
解决办法
8309
查看次数

golang with compile error:undefined:bytes in bytes.Buffer

我在下面定义了一个struct,但总是得到构建错误:"undefined:bytes in bytes.Buffer"

type test struct {
    id       int64
    Content    []byte
    Buffer     *bytes.Buffer
}
Run Code Online (Sandbox Code Playgroud)

go

1
推荐指数
1
解决办法
2493
查看次数

标签 统计

apache-kafka ×1

go ×1

producer ×1