feat: add support for bullmq v6 and postgresql - #138
Merged
Conversation
Contributor
Author
|
@copilot resolve the merge conflicts in this pull request |
There was a problem hiding this comment.
Pull request overview
Adds BullMQ v6 support (including PostgreSQL-backed BullMQ) to the connector, extending the existing queue discovery/command responder pipeline to handle a new BullMQ major version and a non-Redis backend.
Changes:
- Introduces BullMQ v6 responders plus queue factories for Redis and PostgreSQL backends.
- Adds PostgreSQL schema validation, queue discovery, and “info”/queue-type querying; wires PG support through CLI and socket handling.
- Updates queue caching/factory dispatch and bumps dependencies/TypeScript configuration to support the new integrations.
Reviewed changes
Copilot reviewed 18 out of 20 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Adjusts TS compilation root/output settings for updated build layout. |
| package.json | Adds pg + bullmq-v6 alias and updates dependency versions. |
| lib/ws-autoreconnect.ts | Updates WS/chalk imports and tightens instance field initialization. |
| lib/utils.ts | Hardens URL parsing and error typing in Redis URL helper. |
| lib/socket.ts | Adds PG-aware authorization handling, queue cache refresh, and info/queue-type routing. |
| lib/responders/index.ts | Exposes the new BullMQ v6 responders via the responders barrel. |
| lib/responders/bullmqv6-responders.ts | Implements command responders for BullMQ v6 queue/job operations. |
| lib/responders/bullmq-responders.ts | Adds “job not found” handling parity with other responders. |
| lib/responders/bull-responders.ts | Adds “job not found” handling and aligns respond() usage. |
| lib/queues-cache.ts | Extends queue cache update to support PG-discovered queues and v6 PG factory. |
| lib/queue-factory/bullmqv6-factory.ts | Adds BullMQ v6 Redis-backed queue creation. |
| lib/queue-factory/bullmqv6-postgres-factory.ts | Adds BullMQ v6 PostgreSQL-backed queue creation. |
| lib/queue-factory.ts | Adds BullMQ v6 factory dispatch and improves missing-queue log labeling. |
| lib/postgres-validator.ts | Adds PG schema validation, queue discovery, info, and queue-type helpers. |
| lib/interfaces/integration.ts | Allows integrations to accept redisOpts being undefined (for non-Redis backends). |
| lib/cmd.ts | Adds CLI options and validation for PostgreSQL backend selection. |
| tests/postgres-validator.spec.js | Adds unit tests for PG schema validation and queue discovery. |
| tests/bullmqv6-responders.spec.js | Adds unit tests for BullMQ v6 responder behavior. |
| tests/bullmqv6-factory.spec.js | Adds unit tests for BullMQ v6 factory output wiring. |
Suppressed comments (2)
lib/responders/bullmqv6-responders.ts:112
case "getJobLogs"is missing abreak, so it will fall through and also executegetJobSchedulersCount, causing multiple responses for a single request (and potentially the wrong payload).
case "getJobLogs":
const logs = await queue.getJobLogs(data.jobId, data.start, data.end);
respond(ws, startTime, msg.id, logs);
case "getJobSchedulersCount": {
const count = await queue.getJobSchedulersCount();
respond(ws, startTime, msg.id, count);
lib/queue-factory.ts:337
- In the
foundQueue.type === "bullmq"branch, ifmajorVersionis not one of the handled cases, the code logs an error but then falls through to the outercase "bull"and returns a Bull queue. That’s incorrect behavior for an unsupported BullMQ version and can mask configuration issues.
default:
console.error(
chalk.red(`ERROR:`) +
`Unexpected major version: ${foundQueue.majorVersion} for queue ${foundQueue.name}`
);
}
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: manast <95200+manast@users.noreply.github.com>
…nto feat/add-support-for-bullmqv6 Co-authored-by: manast <95200+manast@users.noreply.github.com>
Contributor
…skforcesh/taskforce-connector into feat/add-support-for-bullmqv6
Co-authored-by: manast <95200+manast@users.noreply.github.com>
roggervalf
approved these changes
Aug 11, 2026
Contributor
|
🎉 This PR is included in version 1.39.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
No description provided.