Dapr 1.17.6
This update includes bug fixes:
- Pub/sub messages incorrectly routed to dead-letter queue during graceful shutdown
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.