Question: Throttle Reconnect Attempts when kafka is unavailable
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 22/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- kafka, python
调研方向
The payload names the aiokafka transport and its reconnect.backoff.ms option, but no Faust file or test. Start by finding how Faust passes broker configuration to the aiokafka transport, then reproduce the reconnect loop by running a Faust app against a stopped Kafka broker. The issue asks a question rather than specifying a change, so first confirm with maintainers what behaviour is wanted before writing code.
由索引模型根据 Issue 内容生成。
描述
Checklist
- I have included information about relevant versions
- I have verified that the issue persists when using the
masterbranch of Faust.
Steps to reproduce
Tell us what you did to cause something to happen.
- Connect Faust App normally to a kafka broker
- Kill kafka process
Expected behavior
The reconnect attempts aren't really unexpected. Is there a way to throttle the reconnect attempts or stop the logs from filling so rapidly? I can't find how to pass configuration to the aiokafka transport, which I think can accept reconnect.backoff.ms.
Actual behavior
The logs are spam with Errors very quickly. It looks like 100ms delay.
Full traceback
◠[2024-04-26 13:04:28,809] [35601] [ERROR] Unable connect to node with id 1: KafkaConnectionError: Connection at localhost:9092 closed
◝[2024-04-26 13:04:28,811] [35601] [ERROR] Unable to update metadata from [1]
◝[2024-04-26 13:04:28,852] [35601] [ERROR] Unable connect to node with id 1: KafkaConnectionError: Connection at localhost:9092 closed
◞[2024-04-26 13:04:28,853] [35601] [ERROR] Group Coordinator Request failed: NodeNotReadyError: Attempt to send a request to node which is not ready (node id 1).
◝[2024-04-26 13:04:28,869] [35601] [ERROR] Unable connect to node with id 1: KafkaConnectionError: Connection at localhost:9092 closed
◞[2024-04-26 13:04:28,870] [35601] [ERROR] Unable to update metadata from [1]
◞[2024-04-26 13:04:28,976] [35601] [ERROR] Unable connect to node with id 1: KafkaConnectionError: Connection at localhost:9092 closed
◡[2024-04-26 13:04:28,977] [35601] [ERROR] Group Coordinator Request failed: NodeNotReadyError: Attempt to send a request to node which is not ready (node id 1).
◞[2024-04-26 13:04:28,982] [35601] [ERROR] Unable connect to node with id 1: KafkaConnectionError: Connection at localhost:9092 closed
◡[2024-04-26 13:04:28,983] [35601] [ERROR] Unable to update metadata from [1]
◡[2024-04-26 13:04:29,089] [35601] [ERROR] Unable connect to node with id 1: KafkaConnectionError: Connection at localhost:9092 closed
◟[2024-04-26 13:04:29,090] [35601] [ERROR] Group Coordinator Request failed: NodeNotReadyError: Attempt to send a request to node which is not ready (node id 1).
◡[2024-04-26 13:04:29,098] [35601] [ERROR] Unable connect to node with id 1: KafkaConnectionError: Connection at localhost:9092 closed
◟[2024-04-26 13:04:29,098] [35601] [ERROR] Unable to update metadata from [1]
◟[2024-04-26 13:04:29,204] [35601] [ERROR] Unable connect to node with id 1: KafkaConnectionError: Connection at localhost:9092 closed
◜[2024-04-26 13:04:29,204] [35601] [ERROR] Group Coordinator Request failed: NodeNotReadyError: Attempt to send a request to node which is not ready (node id 1).
◟[2024-04-26 13:04:29,209] [35601] [ERROR] Unable connect to node with id 1: KafkaConnectionError: Connection at localhost:9092 closed
◜[2024-04-26 13:04:29,210] [35601] [ERROR] Unable to update metadata from [1]
◜[2024-04-26 13:04:29,316] [35601] [ERROR] Unable connect to node with id 1: KafkaConnectionError: Connection at localhost:9092 closed
◠[2024-04-26 13:04:29,317] [35601] [ERROR] Group Coordinator Request failed: NodeNotReadyError: Attempt to send a request to node which is not ready (node id 1).
◜[2024-04-26 13:04:29,327] [35601] [ERROR] Unable connect to node with id 1: KafkaConnectionError: Connection at localhost:9092 closed
◠[2024-04-26 13:04:29,328] [35601] [ERROR] Unable to update metadata from [1]
◝[2024-04-26 13:04:29,435] [35601] [ERROR] Unable connect to node with id 1: KafkaConnectionError: Connection at localhost:9092 closed
◞[2024-04-26 13:04:29,436] [35601] [ERROR] Group Coordinator Request failed: NodeNotReadyError: Attempt to send a request to node which is not ready (node id 1).
◝[2024-04-26 13:04:29,441] [35601] [ERROR] Unable connect to node with id 1: KafkaConnectionError: Connection at localhost:9092 closed
◞[2024-04-26 13:04:29,441] [35601] [ERROR] Unable to update metadata from [1]
◡[2024-04-26 13:04:29,546] [35601] [ERROR] Unable connect to node with id 1: KafkaConnectionError: Connection at localhost:9092 closed
◟[2024-04-26 13:04:29,546] [35601] [ERROR] Group Coordinator Request failed: NodeNotReadyError: Attempt to send a request to node which is not ready (node id 1).
◡[2024-04-26 13:04:29,551] [35601] [ERROR] Unable connect to node with id 1: KafkaConnectionError: Connection at localhost:9092 closed
◟[2024-04-26 13:04:29,551] [35601] [ERROR] Unable to update metadata from [1]
◟[2024-04-26 13:04:29,656] [35601] [ERROR] Unable connect to node with id 1: KafkaConnectionError: Connection at localhost:9092 closed
◜[2024-04-26 13:04:29,656] [35601] [ERROR] Group Coordinator Request failed: NodeNotReadyError: Attempt to send a request to node which is not ready (node id 1).
◟[2024-04-26 13:04:29,660] [35601] [ERROR] Unable connect to node with id 1: KafkaConnectionError: Connection at localhost:9092 closed
◜[2024-04-26 13:04:29,661] [35601] [ERROR] Unable to update metadata from [1]
◜[2024-04-26 13:04:29,766] [35601] [ERROR] Unable connect to node with id 1: KafkaConnectionError: Connection at localhost:9092 closed
◠[2024-04-26 13:04:29,767] [35601] [ERROR] Group Coordinator Request failed: NodeNotReadyError: Attempt to send a request to node which is not ready (node id 1).
◜[2024-04-26 13:04:29,776] [35601] [ERROR] Unable connect to node with id 1: KafkaConnectionError: Connection at localhost:9092 closed
◠[2024-04-26 13:04:29,777] [35601] [ERROR] Unable to update metadata from [1]
◡[2024-04-26 13:04:29,881] [35601] [ERROR] Unable connect to node with id 1: Multiple exceptions: [Errno 61] Connect call failed ('::1', 9092, 0, 0), [Errno 61] Connect call failed ('127.0.0.1', 9092)
◟[2024-04-26 13:04:29,882] [35601] [ERROR] Group Coordinator Request failed: NodeNotReadyError: Attempt to send a request to node which is not ready (node id 1).
◠[2024-04-26 13:04:29,887] [35601] [ERROR] Unable connect to node with id 1: Multiple exceptions: [Errno 61] Connect call failed ('::1', 9092, 0, 0), [Errno 61] Connect call failed ('127.0.0.1', 9092) ```
# Versions
* Python version Cython 3.11.8
* Faust version v0.11.0
* Operating system Darwin x86_64
* Kafka version 3.7.0
* RocksDB version (if applicable) 9.0.0
- 主要语言
- Python
- 星标
- 1.9k
- 派生
- 205
- 平均合并
- 2 小时 2 分钟
- 30 天内合并 PR
- 1
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
faust-streaming/faust 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 86/100
faust-streaming/faust#804 ·
-
scripts/install script forces use of ./venv virtualenv, impossible to use with virtualenvwrapper未关闭
难度 1/5 1 小时以内 新手友好度 62/100
faust-streaming/faust#28 · 1 条评论 ·
-
[BUG] SASL PLAINTEXT producer initialization fails : missing sasl_plain_username/password可能已有人在做 @wbarnha 于 56 天前认领。 未关闭
faust-streaming/faust#794 · 2 条评论 · 1 个 reaction · 已指派 2 人 ·
-
难度 4/5 3-5 天 新手友好度 18/100
faust-streaming/faust#670 ·
-
难度 4/5 3-5 天 新手友好度 18/100
faust-streaming/faust#666 ·
查看 faust-streaming/faust 的全部 Issue
相似的 Issue
-
bug game: 0100FF500E34A000 game: 0400FF500E34A001 mac packing
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 2 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 74/100
jxxghp/MoviePilot#7576 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 64/100
jbaruch/software-factory#266 ·
维护者通常 1 天内回复
-
cron: raise a distinct error when next_fire finds no match in its search bound (from #813 item 5)未关闭
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复