调用Rest调用时出现Kafka消费者错误



当使用者调用rest模板但远程主机不可用时,如何处理以下错误。

[kafka-coordinator-heartbeat-thread | dirty_node] INFO  o.a.k.c.c.i.AbstractCoordinator - [Consumer clientId=consumer-dirty_node-7, groupId=dirty_node] Member consumer-dirty_node-7-8fdc41f2-4a8a-41ca-9234-b6b56490d28d sending LeaveGroup request to coordinator kafka-2.qat.test.net:9093 (id: 2147483645 rack: null) due to consumer poll timeout has expired. This means the time between subsequent calls to poll() was longer than the configured max.poll.interval.ms, which typically implies that the poll loop is spending too much time processing messages. You can address this either by increasing max.poll.interval.ms or by reducing the maximum size of batches returned in poll() with max.poll.records.

错误:读取tcp 127.0.0.:443::远程主机强制关闭了现有连接。

注意:我没有设置任何轮询超时。它是默认值。我应该增加轮询时间还是减少轮询时间。

根据文档,max.poll.interval.ms是使用使用者组管理时调用poll((之间的最大延迟。

因此,您应该增加max.poll.interval.ms并使其比休息模板的超时时间更长。

相关内容

最新更新