-
-
Notifications
You must be signed in to change notification settings - Fork 88
MessageQueue.nativeRetrial property
#251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Implements MessageQueue.nativeRetrial property to indicate whether the message queue backend provides native retry mechanisms. When true, Fedify skips its own retry logic and relies on the backend to handle retries, avoiding duplicate retry mechanisms. - DenoKvMessageQueue.nativeRetrial is true (Deno KV provides automatic retry) - WorkersMessageQueue.nativeRetrial is true (Cloudflare Queues provide automatic retry) - InProcessMessageQueue.nativeRetrial is false (no native retry) - ParallelMessageQueue.nativeRetrial inherits from wrapped queue Fixes fedify-dev#250 Co-Authored-By: Claude <[email protected]>
|
The docs for this pull request have been published: |
Updates documentation across all relevant manual sections to explain the new MessageQueue.nativeRetrial property and its impact on retry behavior: - Add comprehensive "Native retry mechanisms" section to mq.md - Update federation.md to note when retry policies are ignored - Update send.md and inbox.md to explain native retry behavior - Document which implementations currently support native retry - Clarify benefits and usage of native retry mechanisms The documentation now clearly explains when Fedify's retry logic is bypassed in favor of backend-native retry mechanisms for better efficiency and reliability. Co-Authored-By: Claude <[email protected]>
|
The latest push to this pull request has been published to JSR and npm as a pre-release: |
MessageQueue.nativeRetrial property
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds an optional MessageQueue.nativeRetrial flag so Fedify can defer retry logic to backends that support it, and updates code, tests, and docs accordingly.
- Introduce
nativeRetrialon all queue implementations and in the interface - Update middleware to skip Fedify retries when
nativeRetrialis true - Extend tests and documentation to cover and describe the new property
Reviewed Changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| fedify/x/denokv.ts | Set DenoKvMessageQueue.nativeRetrial = true |
| fedify/x/cfworkers.ts | Set WorkersMessageQueue.nativeRetrial = true |
| fedify/federation/mq.ts | Add nativeRetrial to MessageQueue interface, InProcessMessageQueue, and ParallelMessageQueue |
| fedify/federation/middleware.ts | Skip retry logic in outbox/inbox if nativeRetrial is enabled |
| fedify/federation/mq.test.ts | Add unit tests for nativeRetrial on each queue and inheritance via ParallelMessageQueue |
| fedify/federation/middleware.test.ts | Add integration tests for processQueuedTask with and without nativeRetrial |
| docs/package.json | Bump @fedify/fedify dependency to 1.7.0-pr.251.885 |
| docs/manual/send.md | Update retry description to mention nativeRetrial |
| docs/manual/mq.md | Document native retry support and list implementations |
| docs/manual/inbox.md | Update inbox retry docs with nativeRetrial behavior |
| docs/manual/federation.md | Note that retry policies are ignored when nativeRetrial is true |
| CHANGES.md | Add changelog entry for the nativeRetrial feature |
Files not reviewed (1)
- docs/pnpm-lock.yaml: Language not supported
Summary
Adds optional
MessageQueue.nativeRetrialproperty to indicate whether the message queue backend provides native retry mechanisms. Whentrue, Fedify skips its own retry logic and relies on the backend to handle retries.Changes
DenoKvMessageQueue.nativeRetrialistrueWorkersMessageQueue.nativeRetrialistrueInProcessMessageQueue.nativeRetrialisfalseParallelMessageQueue.nativeRetrialinherits from wrapped queueTest plan
Fixes #250