Skip to content

Conversation

@JoshuaKirby88
Copy link

Summary

  • Document how to add a queue handler to a custom worker that uses runWithCloudflareRequestContext so queue processing runs inside the Next.js/OpenNext request context.
  • Show a generic example that reconstructs a Request from queue message metadata and calls application code with the usual context helpers.
  • Add a short cross-link from the caching page’s queue section to the custom worker how-to for users who need this pattern.

Document using runWithCloudflareRequestContext in queue handlers and add
a cross-link to the caching page.
Copilot AI review requested due to automatic review settings January 10, 2026 14:01
@JoshuaKirby88 JoshuaKirby88 requested review from a team and james-elicx as code owners January 10, 2026 14:01
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds documentation for implementing queue handlers in custom Cloudflare workers while maintaining access to the Next.js request context. The changes enable developers to process queue messages with the same context helpers (getCloudflareContext(), headers(), cookies()) available in regular HTTP requests.

Changes:

  • Added a comprehensive guide showing how to implement queue handlers using runWithCloudflareRequestContext
  • Provided a complete code example demonstrating message reconstruction from queue metadata
  • Added a cross-reference link from the caching page to guide users who need this pattern

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
pages/cloudflare/howtos/custom-worker.mdx Added new section "Queue handlers with Next.js request context" with complete implementation example and explanation
pages/cloudflare/caching.mdx Added cross-reference link to the custom worker how-to for users processing queue messages

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@james-elicx james-elicx requested a review from vicb January 10, 2026 14:04
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