Kafka 组正在重新平衡,重新加入”,“groupId”:“INSB”:“my-app“error”:“组正在重新平衡,因此需要重新加入

kmynzznz  于 11个月前  发布在  Apache
关注(0)|答案(1)|浏览(282)
{"level":"ERROR","timestamp":"2023-11-21T03:53:49.952Z","logger":"kafkajs","message":"[Connection] Response Heartbeat(key: 12, version: 3)","broker":"localhost:9098","clientId":"my-app","error":"The group is rebalancing, so a rejoin is needed","correlationId":18604,"size":10}
{"level":"WARN","timestamp":"2023-11-21T03:53:51.719Z","logger":"kafkajs","message":"[Runner] The group is rebalancing, re-joining","groupId":"INSB_BNF_ATM_MIN1_CALL","memberId":"my-app-c19fa855-2dbb-443d-a3c8-50fcfff9534e","error":"The group is rebalancing, so a rejoin is needed"}
{"level":"ERROR","timestamp":"2023-11-21T04:03:52.295Z","logger":"kafkajs","message":"[Connection] Connection error: write after end","broker":"localhost:9094","clientId":"my-app","stack":"Error [ERR_STREAM_WRITE_AFTER_END]: write after end\n    at Socket.Writable.write (internal/streams/writable.js:292:11)\n    at Object.sendRequest (/root/mfscp_strategy_server/node_modules/kafkajs/src/network/connection.js:409:27)\n    at SocketRequest.send [as sendRequest] (/root/mfscp_strategy_server/node_modules/kafkajs/src/network/requestQueue/index.js:134:23)\n    at SocketRequest.send (/root/mfscp_strategy_server/node_modules/kafkajs/src/network/requestQueue/socketRequest.js:88:10)\n    at RequestQueue.sendSocketRequest (/root/mfscp_strategy_server/node_modules/kafkajs/src/network/requestQueue/index.js:182:19)\n    at RequestQueue.push (/root/mfscp_strategy_server/node_modules/kafkajs/src/network/requestQueue/index.js:162:12)\n    at /root/mfscp_strategy_server/node_modules/kafkajs/src/network/connection.js:404:29\n    at new Promise (<anonymous>)\n    at sendRequest (/root/mfscp_strategy_server/node_modules/kafkajs/src/network/connection.js:399:14)\n    at async Connection.send (/root/mfscp_strategy_server/node_modules/kafkajs/src/network/connection.js:418:53)"}
{"level":"ERROR","timestamp":"2023-11-21T06:19:03.219Z","logger":"kafkajs","message":"[Connection] Response Heartbeat(key: 12, version: 3)","broker":"localhost:9098","clientId":"my-app","error":"The group is rebalancing, so a rejoin is needed","correlationId":16,"size":10}
{"level":"ERROR","timestamp":"2023-11-21T06:19:03.253Z","logger":"kafkajs","message":"[Connection] Response Heartbeat(key: 12, version: 3)","broker":"localhost:9098","clientId":"my-app","error":"The group is rebalancing, so a rejoin is needed","correlationId":17,"size":10}
{"level":"WARN","timestamp":"2023-11-21T06:19:03.314Z","logger":"kafkajs","message":"[Runner] The group is rebalancing, re-joining","groupId":"INSB_BNF_ATM_MIN1_CALL","memberId":"my-app-ad3717ae-8e15-46d9-ad7c-dc821c0aa0f4","error":"The group is rebalancing, so a rejoin is needed"}

字符串

mgdq6dx1

mgdq6dx11#

无论你在JS代码中做什么,它都花费了太多时间。
当Kafka客户端在会话超时时没有发送心跳消息时会发生重新平衡。重新平衡是不好的,你应该避免。为了避免它,你有两个选择:
1.提高代码逻辑速度
1.增加会话超时session.timeout.ms

相关问题