Skip to content

Add processor graceful shutdown#288

Open
karenychen wants to merge 16 commits into
Azure:mainfrom
karenychen:codex/processor-close-graceful-shutdown
Open

Add processor graceful shutdown#288
karenychen wants to merge 16 commits into
Azure:mainfrom
karenychen:codex/processor-close-graceful-shutdown

Conversation

@karenychen

Copy link
Copy Markdown
Collaborator

Summary

  • Add Processor.Close(ctx) to stop receiving and cancel in-flight handlers during shutdown.
  • Track in-flight messages so close can abandon the messages currently held by the processor.
  • Abandon tracked messages concurrently as best effort while respecting caller context cancellation.
  • Keep failed abandon attempts tracked so a later close can retry them.

Testing

  • go test -run TestInFlightMessages .
  • go test -race -run 'TestInFlightMessages|TestProcessor' .\n- go test ./...\n- git diff --check

@karenychen

Copy link
Copy Markdown
Collaborator Author

Code review

No issues found. Checked for bugs and AGENTS.md compliance.

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.

1 participant