bee-queue / arena

An interactive UI dashboard for Bee, Bull and BullMQ packages
MIT License
855 stars 235 forks source link

Support for IORedis Cluster #666

Open matteomattei opened 1 year ago

matteomattei commented 1 year ago

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);
matteomattei commented 1 year ago

Another thing: currently the bull-arena library supports password option in redis configuration but does not support username.