dapr v1.17.6 版本更新介绍
发布日期: 2026-04-28
版本号: v1.17.6
Dapr 1.17.6版本修复了一个关键问题:在订阅优雅关闭或发布订阅组件热重载期间,到达的消息会被错误地路由到死信队列。具体表现为,当订阅开始关闭时,Dapr会立即拒绝新到达的消息,而支持死信队列的消息代理将这些拒绝视为永久性投递失败,从而将消息转入死信队列且不再重试。这导致在滚动部署、重启等触发优雅关闭的场景下,本应被重新投递给其他健康消费者的消息会静默丢失,影响了声明式、编程式及流式订阅。根本原因在于关闭订阅时Dapr返回的“订阅已关闭”错误被组件层转换为拒绝确认并发送给代理。为此,新版本改为在订阅关闭期间暂存到达的消息,阻塞消息处理直至与代理的连接断开,使代理将消息视为未确认并重新投递,同时确保已在处理中的消息正常完成。
更新内容 (中文)
Dapr 1.17.6
此次更新包含以下错误修复:
优雅关闭期间 Pub/sub 消息被错误路由至死信队列
问题描述
在优雅关闭(或热重载 Pub/sub 组件)期间,订阅开始关闭后到达的消息会被 Dapr 立即拒绝应答(NACK)。 支持死信队列的代理将这些 NACK 解释为永久性投递失败,并将消息路由到死信队列,之后不再重试。
影响范围
配置了死信队列的 Pub/sub 应用在滚动部署、重启或任何触发优雅关闭的事件期间可能会丢失消息。 这些消息未重新投递给其他健康的消费者,而是被静默转移到死信队列。 此问题影响所有订阅类型:声明式、编程式(HTTP 和 gRPC)以及流式订阅。
根本原因
当订阅关闭时,Dapr 以“订阅已关闭”错误拒绝新的传入消息。 可插拔的 Pub/sub 组件层将此错误转换为发送回代理的 NACK。 代理随后将消息视为永久性失败,并将其路由到配置的死信主题。
解决方案
Dapr 现在会在订阅关闭期间暂存到达的消息,而不是拒绝它们。 消息处理程序会阻止后续操作,直到代理连接被切断,此时代理将消息视为未确认,并重新投递给其他可用消费者。 已在处理中的消息会继续正常完成,直到订阅完全关闭。
更新内容 (原始)
Dapr 1.17.6
This update includes bug fixes:
Pub/sub messages incorrectly routed to dead-letter queue during graceful shutdown
Problem
During graceful shutdown (or hot-reload of a pub/sub component), messages arriving after the subscription began closing were immediately NACKed by Dapr. Brokers that support dead-letter queues interpreted these NACKs as permanent delivery failures and routed the messages to the dead-letter queue, where they were never retried.
Impact
Applications using pub/sub with dead-letter queues configured could lose messages during rolling deployments, restarts, or any event that triggers graceful shutdown. Rather than being redelivered to another healthy consumer, these messages were silently diverted to the dead-letter queue. This affected all subscription types: declarative, programmatic (HTTP and gRPC), and streaming subscriptions.
Root Cause
When a subscription was closing, Dapr rejected new incoming messages with a “subscription is closed” error. The pluggable pub/sub component layer translated this error into a NACK sent back to the broker. The broker then treated the message as a permanent failure and routed it to the configured dead-letter topic.
Solution
Dapr now holds messages that arrive during subscription shutdown instead of rejecting them. The message handler blocks until the broker connection is torn down, at which point the broker treats the message as unacknowledged and redelivers it to another available consumer. In-flight messages that were already being processed continue to complete normally before the subscription fully closes.
下载链接
- daprd_darwin_amd64.tar.gz
- daprd_darwin_amd64.tar.gz.sha256
- daprd_darwin_arm64.tar.gz
- daprd_darwin_arm64.tar.gz.sha256
- daprd_linux_amd64-stablecomponents.tar.gz
- daprd_linux_amd64-stablecomponents.tar.gz.sha256
- daprd_linux_amd64.tar.gz
- daprd_linux_amd64.tar.gz.sha256
- daprd_linux_arm-stablecomponents.tar.gz
- daprd_linux_arm-stablecomponents.tar.gz.sha256
- daprd_linux_arm.tar.gz
- daprd_linux_arm.tar.gz.sha256
- daprd_linux_arm64-stablecomponents.tar.gz
- daprd_linux_arm64-stablecomponents.tar.gz.sha256
- daprd_linux_arm64.tar.gz
- daprd_linux_arm64.tar.gz.sha256
- daprd_windows_amd64.zip
- daprd_windows_amd64.zip.sha256
- grafana-actor-dashboard.json
- grafana-actor-dashboard.json.sha256
- grafana-sidecar-dashboard.json
- grafana-sidecar-dashboard.json.sha256
- grafana-system-services-dashboard.json
- grafana-system-services-dashboard.json.sha256
- injector_darwin_amd64.tar.gz
- injector_darwin_amd64.tar.gz.sha256
- injector_darwin_arm64.tar.gz
- injector_darwin_arm64.tar.gz.sha256
- injector_linux_amd64.tar.gz
- injector_linux_amd64.tar.gz.sha256
- injector_linux_arm.tar.gz
- injector_linux_arm.tar.gz.sha256
- injector_linux_arm64.tar.gz
- injector_linux_arm64.tar.gz.sha256
- injector_windows_amd64.zip
- injector_windows_amd64.zip.sha256
- operator_darwin_amd64.tar.gz
- operator_darwin_amd64.tar.gz.sha256
- operator_darwin_arm64.tar.gz
- operator_darwin_arm64.tar.gz.sha256
- operator_linux_amd64.tar.gz
- operator_linux_amd64.tar.gz.sha256
- operator_linux_arm.tar.gz
- operator_linux_arm.tar.gz.sha256
- operator_linux_arm64.tar.gz
- operator_linux_arm64.tar.gz.sha256
- operator_windows_amd64.zip
- operator_windows_amd64.zip.sha256
- placement_darwin_amd64.tar.gz
- placement_darwin_amd64.tar.gz.sha256
- placement_darwin_arm64.tar.gz
- placement_darwin_arm64.tar.gz.sha256
- placement_linux_amd64.tar.gz
- placement_linux_amd64.tar.gz.sha256
- placement_linux_arm.tar.gz
- placement_linux_arm.tar.gz.sha256
- placement_linux_arm64.tar.gz
- placement_linux_arm64.tar.gz.sha256
- placement_windows_amd64.zip
- placement_windows_amd64.zip.sha256
- scheduler_darwin_amd64.tar.gz
- scheduler_darwin_amd64.tar.gz.sha256
- scheduler_darwin_arm64.tar.gz
- scheduler_darwin_arm64.tar.gz.sha256
- scheduler_linux_amd64.tar.gz
- scheduler_linux_amd64.tar.gz.sha256
- scheduler_linux_arm.tar.gz
- scheduler_linux_arm.tar.gz.sha256
- scheduler_linux_arm64.tar.gz
- scheduler_linux_arm64.tar.gz.sha256
- scheduler_windows_amd64.zip
- scheduler_windows_amd64.zip.sha256
- sentry_darwin_amd64.tar.gz
- sentry_darwin_amd64.tar.gz.sha256
- sentry_darwin_arm64.tar.gz
- sentry_darwin_arm64.tar.gz.sha256
- sentry_linux_amd64.tar.gz
- sentry_linux_amd64.tar.gz.sha256
- sentry_linux_arm.tar.gz
- sentry_linux_arm.tar.gz.sha256
- sentry_linux_arm64.tar.gz
- sentry_linux_arm64.tar.gz.sha256
- sentry_windows_amd64.zip
- sentry_windows_amd64.zip.sha256