Pub/Sub c++ client: How to prevent/reduce ack failures on at least once delivery subscription
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 30/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- cpp, google-cloud
调研方向
首先检查 google/cloud/pubsub/internal/ack_handler_wrapper.cc:29 和报告中的客户端配置,然后使用所描述的负载测试重现故障。跟踪 UNAVAILABLE 错误和重新投递相关的确认及 deadline-extension 行为。完成的标准是确定 ack 失败和延迟重新投递的原因,并验证出一种可以减少或防止这些问题的方法。
由索引模型根据 Issue 内容生成。
描述
Client version: v2.39.0
MaxDeadline = seconds(0) (default value)
MaxDeadlineExtension = seconds(180)
MinDeadlineExtension = seconds(60)
MaxOutstandingMessages = 250
MaxConcurrency = 1
Time to time acks are failing. There is no retry for at least once delivery. How to reduce/prevent these failures? It happens 10-20 times a day.
Some of the logged errors [file_name] - [message]
[NTPubSubLogger] /google-cloud-cpp/google/cloud/pubsub/internal/ack_handler_wrapper.cc:29 - error while trying to ack(), status=UNAVAILABLE: recvmsg:Connection reset by peer
[NTPubSubLogger] /google-cloud-cpp/google/cloud/pubsub/internal/ack_handler_wrapper.cc:29 - error while trying to ack(), status=UNAVAILABLE: 502:Bad Gateway
It sounds like network issue but I doubt that. It happens every day 10-20 times. I can reproduce it with a 10 minutes of load tests by consuming/processing 300 messages per second.
Messages are ordered by account id in the system. When this happens the messages are stuck on pub/sub for 10-20 minutes because of unacked message. initial deadline=60 seconds, max deadline = 180 seconds. I observed the cpp client logs in debug mode. There is no ModifyAckDeadlineRequest is being made but still messages redelivered between 10-20 minutes later, in fact they should arrive in a few minutes. (That's another issue and maybe not related to the client.)
- 主要语言
- C++
- 星标
- 659
- 派生
- 471
- 平均合并
- 1 天 10 小时
- 30 天内合并 PR
- 100
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
googleapis/google-cloud-cpp 的其他 Issue
-
cleanup(storage): remove deprecated OpenTelemetry rpc.message.type and rpc.message.id attributes未关闭api: storage type: cleanup
难度 2/5 1-3 小时 新手友好度 76/100
googleapis/google-cloud-cpp#16544 ·
维护者通常 1 天内回复
-
api: storage priority: p2 type: bug
难度 2/5 1-3 小时 新手友好度 82/100
googleapis/google-cloud-cpp#16529 ·
维护者通常 1 天内回复
-
type: feature request
难度 2/5 1-3 小时 新手友好度 73/100
googleapis/google-cloud-cpp#16193 ·
维护者通常 1 天内回复
-
api: storage type: cleanup
难度 3/5 1-2 天 新手友好度 55/100
googleapis/google-cloud-cpp#16545 ·
维护者通常 1 天内回复
-
api: storage type: cleanup
难度 3/5 1-2 天 新手友好度 68/100
googleapis/google-cloud-cpp#16404 ·
维护者通常 1 天内回复
查看 googleapis/google-cloud-cpp 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 76/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 65/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
ros-navigation/navigation2#6648 · 1 条评论 ·
维护者通常 1 天内回复
-
[BUG] OTA Requestor accepts reserved provider endpoint 0xFFFF可能已有人在做 @Chapoly1305 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
project-chip/connectedhomeip#74742 ·
维护者通常 1 天内回复