Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for redis-cluster #52

Open
jjoek opened this issue Jul 30, 2024 · 0 comments
Open

Support for redis-cluster #52

jjoek opened this issue Jul 30, 2024 · 0 comments

Comments

@jjoek
Copy link

jjoek commented Jul 30, 2024

Hey I am using this with aws memory db and I get the following error

ReplyError: CROSSSLOT Keys in request don't hash to the same slot
    at parseError (/app/node_modules/redis-parser/lib/parser.js:179:12)
    at parseType (/app/node_modules/redis-parser/lib/parser.js:302:14) {
  command: {
    name: 'evalsha',
    args: [
      '04bc84f52b5c1a1238af36a0c38c474721088663',
      '9',
      'bull:default:wait',
      'bull:default:active',
      'bull:default:priority',
      'bull:default:events',
      'bull:default:stalled',
      'bull:default:limiter',
      'bull:default:delayed',
      'bull:default:paused',
      'bull:default:meta',
      'bull:default:',
      '1722378879336',
      '',
      <Buffer de 00 03 a5 74 6f 6b 65 6e d9 26 61 34 61 65 39 32 37 61 2d 61 32 62 36 2d 34 34 36 39 2d 62 35 39 30 2d 37 38 65 37 34 37 32 64 65 38 64 33 3a 30 ac ... 24 more bytes>
    ]
  }
}

which after some bit of research I found out that the issue has something to do with redis cluster and from bullmq documentation:

bullmq docs on redis cluster

We are supposed to prefix our queues, I did this by adding the prefix option to the queue in my config to something as below:

const queueConfig: QueueConfig = {
  connection: {
    host: Env.get("QUEUE_REDIS_HOST"),
    port: Env.get("QUEUE_REDIS_PORT"),
    password: Env.get("QUEUE_REDIS_PASSWORD"),
  },

  queue: {
    prefix: "{queue-prefix}",
  },

When I run queue listen that is when I get the above error. Any ideas what could be wrong or what I need to update or change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant