Skip to content

Support for IORedis Cluster #666

Open
@matteomattei

Description

@matteomattei

Does bull-arena support IORedis Cluster??
I am having problems with AWS MemoryDB (that uses Redis Cluster under the hood).
This is the configuration I am using to connect to the Redis cluster:

const redisClient = new IORedis.Cluster(
      [
        {
          port: 6379,
          host: 'xxxx',
        },
      ],
      {
        dnsLookup: (address, callback) => callback(null, address),
        clusterRetryStrategy(times) {
          return Math.min(times * 500, 2000);
        },
        redisOptions: {
          username,
          password,
          tls: {
            servername: 'xxxx',
          },
        },
      },
    );

And this is how I instantiate the queue with BullMQ:

import { Queue } from 'bullmq';

const myQueue = new Queue("test, {
    connection: redisClient
});

What about bull-arena? Is there a way to pass the redisClient to the redis option in the queue array of arenaConfig?
Something like this:

import Arena from 'bull-arena';
import { Queue, FlowProducer } from "bullmq";

const arenaConfig = Arena({
  BullMQ: Queue,
  queues: [
    {
      type: 'bullmq',
      name: "test",
      hostId: "worker",
      redis: redisClient // ??? is it possible?
    },
  ],
},
{
  basePath: '/arena',
  disableListen: true,
});

app.use('/', arenaConfig);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions