Add queue auto-discovery support for BullMQ meta keys#134
Open
Copilot wants to merge 5 commits into
Open
Conversation
Copilot
AI
changed the title
[WIP] Add support in queue auto discovery for meta keys
Add queue auto-discovery support for BullMQ meta keys
Jun 15, 2026
There was a problem hiding this comment.
Pull request overview
Extends Bull/BullMQ queue auto-discovery so BullMQ queues are found even when only :meta exists (e.g., before any jobs create :id keys), while keeping downstream queue handling based on canonical :id identifiers.
Changes:
- Add
:meta(TYPE hash) scanning alongside existing:id(TYPE string) scanning, normalizing:meta→:idand deduplicating results. - Replace regex-based queue key parsing with delimiter-based parsing (
lastIndexOf) supporting bothidandmetasuffixes. - Add tests covering meta-only discovery and de-duplication when both key types exist.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
lib/queue-factory.ts |
Adds meta-key scanning + key parsing hardening, and dedupes discovered queues. |
tests/queue-factory.spec.js |
Adds targeted tests for BullMQ meta-key discovery and deduplication. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
roggervalf
approved these changes
Jun 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Queue auto-discovery currently relies on
:idkeys, which causes modern BullMQ queues to be missed when only:metaexists (e.g., worker/queue initialized before any jobs). This change extends discovery to include:metakeys while preserving existing queue parsing and typing behavior.Discovery behavior
*:*:id(TYPE string)*:*:meta(TYPE hash):metakeys to canonical:idqueue identifiers so downstream logic remains unchanged.Queue key parsing hardening
lastIndexOf) forid|metasuffixes.prefix,name) semantics used by discovery and warning paths.Focused coverage
:metaexists:idand:metaexist