小编Ken*_*hia的帖子

没有待答复:ConsumerRecord

我正在尝试使用 ReplyingKafkaTemplate,并且间歇性地不断看到下面的消息。

没有待处理的回复:ConsumerRecord(主题 = 请求回复主题,分区 = 8,偏移量 = 1,CreateTime = 1544653843269,序列化键大小 = -1,序列化值大小 = 1609,标头 = RecordHeaders(标头 = [RecordHeader(键 = kafka_correlationId,值 = [-14, 65, 21, -118, 70, -94, 72, 87, -113, -91, 92, 72, -124, -110, -64, -94])], isReadOnly = false),key = null,correlationId: [-18271255759235816475365319231847350110],可能超时,或使用共享回复主题

它将源于下面的代码

RequestReplyFuture<K, V, R> future = this.futures.remove(correlationId);
if (future == null) {
  if (this.sharedReplyTopic) {
    if (this.logger.isDebugEnabled()) {
      this.logger.debug(missingCorrelationLogMessage(record, correlationId));
    }
  }
  else if (this.logger.isErrorEnabled()) {
    this.logger.error(missingCorrelationLogMessage(record, correlationId));
  }
}
Run Code Online (Sandbox Code Playgroud)

但只是间歇性地发生

我还将共享的replyTopic设置为 false ,如下所示,并尝试强制更长的超时

ReplyingKafkaTemplate<String, Object, …
Run Code Online (Sandbox Code Playgroud)

java apache-kafka spring-kafka

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

标签 统计

apache-kafka ×1

java ×1

spring-kafka ×1