Skip to content

C# : graceful PushConsumer shutdown aligned with Go client - #1217

Merged
RongtongJin merged 1 commit into
apache:masterfrom
guyinyou:csharp-push-consumer-graceful-shutdown
Apr 9, 2026
Merged

RongtongJin merged 1 commit into
apache:masterfrom
guyinyou:csharp-push-consumer-graceful-shutdown

Conversation

@guyinyou

@guyinyou guyinyou commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

feat(csharp): graceful PushConsumer shutdown

  • After Stopping, cancel assignment scan and receive backoff only; defer ACK/DLQ CTS cancellation
  • Track inflight receive calls; wait up to request timeout plus long polling timeout
  • Wait until sum of per-queue cached messages reaches zero; warn every 10s with current count
  • Brief delay before cancelling consumption and ACK-related tokens, then shutdown RPC client
  • Pair inflight increments/decrements in ProcessQueue receive continuation
  • Skip ScanAssignments when consumer is not Running

- After Stopping, cancel assignment scan and receive backoff only; defer ACK/DLQ CTS cancellation
- Track inflight receive calls; wait up to request timeout plus long polling timeout
- Wait until sum of per-queue cached messages reaches zero; warn every 10s with current count
- Brief delay before cancelling consumption and ACK-related tokens, then shutdown RPC client
- Pair inflight increments/decrements in ProcessQueue receive continuation
- Skip ScanAssignments when consumer is not Running
@RongtongJin
RongtongJin merged commit 17ab1b4 into apache:master Apr 9, 2026
15 checks passed
terrancesli added a commit to terrancesli/rocketmq-clients that referenced this pull request May 15, 2026
โ€ฆpache#1217)

- After Stopping, cancel assignment scan and receive backoff only; defer ACK/DLQ CTS cancellation
- Track inflight receive calls; wait up to request timeout plus long polling timeout
- Wait until sum of per-queue cached messages reaches zero; warn every 10s with current count
- Brief delay before cancelling consumption and ACK-related tokens, then shutdown RPC client
- Pair inflight increments/decrements in ProcessQueue receive continuation
- Skip ScanAssignments when consumer is not Running

Co-authored-by: guyinyou <guyinyou.gyy@alibaba-inc.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants