Skip to content

feat: add support for bullmq v6 and postgresql - #138

Merged
manast merged 7 commits into
masterfrom
feat/add-support-for-bullmqv6
Aug 11, 2026
Merged

feat: add support for bullmq v6 and postgresql#138
manast merged 7 commits into
masterfrom
feat/add-support-for-bullmqv6

Conversation

@manast

@manast manast commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@manast
manast requested review from roggervalf and a lite review from Copilot August 10, 2026 21:59
@manast

manast commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 a break, so it will fall through and also execute getJobSchedulersCount, 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, if majorVersion is not one of the handled cases, the code logs an error but then falls through to the outer case "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.

Comment thread lib/responders/bullmqv6-responders.ts Outdated
Comment thread lib/responders/bullmqv6-responders.ts
Comment thread lib/cmd.ts
Comment thread tests/bullmqv6-responders.spec.js
Comment thread tests/bullmqv6-factory.spec.js
Comment thread tests/postgres-validator.spec.js
Comment thread lib/cmd.ts
Comment thread lib/queues-cache.ts Outdated
Copilot AI and others added 3 commits August 10, 2026 22:07
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>

Copilot AI commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Addressed in 005800f.

Co-authored-by: manast <95200+manast@users.noreply.github.com>
@manast
manast merged commit 2976a40 into master Aug 11, 2026
5 checks passed
@manast
manast deleted the feat/add-support-for-bullmqv6 branch August 11, 2026 19:25
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.39.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants