Enable Cross-Worker Queue Testing Locally #7548
StefanStuehrmann
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Proposal: SQLite-based Queue Implementation for Local Development
Background
Currently, wrangler's local queue implementation uses an in-memory array for storing queue messages, which prevents queue usage across different workers during local development. This limitation makes it difficult to test distributed worker architectures locally.
Proposal
Extend the current queue implementation to optionally use SQLite for message storage (which is already used for D1).
This would enable:
Implementation Details
Configuration
You could think about if a queue state should always reside with the consumer worker as queues can only have one consumer but multiple producers.
Key Features
Benefits
Implementation Impact
This change would be isolated to the local development environment and wouldn't affect production queues. The implementation would live entirely within the miniflare package and tests and wouldn't require changes to the core Workers runtime.
Looking forward to hearing the queue teams thoughts on this approach.
The effort estimation for the implementation seems to be relatively small (few days).
So in case it does not make it to the queues team backlog I would be willing to contribute once we agree on details and it will make it into the main branch.
Beta Was this translation helpful? Give feedback.
All reactions