bull icon indicating copy to clipboard operation
bull copied to clipboard

Redis cluster issue

Open shubham190892 opened this issue 7 years ago • 4 comments

We are getting the following reds-cluster exception while trying to run the bull process

command:
{ name: 'brpoplpush',
args: [ 'bull:squadSync:wait', 'bull:squadSync:active', '5' ] } }
09-10-2019 14:34 +00:00: BRPOPLPUSH { ReplyError: CROSSSLOT Keys in request don't hash to the same slot

Bull version

"bull": "^3.11.0"

Additional information

elasticache 5.0.4

shubham190892 avatar Oct 09 '19 14:10 shubham190892

Hi! Please try to rename your queue from squadSync to {squadSync}, it should help. See also https://redis.io/topics/cluster-spec#keys-hash-tags and https://github.com/OptimalBits/bull/blob/develop/PATTERNS.md#redis-cluster

stansv avatar Oct 09 '19 15:10 stansv

It worked. Thanks

shubham190892 avatar Oct 10 '19 08:10 shubham190892

As I understand if I have only 1 queue named {squadSync} ( or {anything}squadSync) it means all redis cluster nodes except 1 is not working

tomfun avatar Dec 23 '22 20:12 tomfun

Same error as

Error: CROSSSLOT Keys in request don't hash to the same slot
Stack: ReplyError: CROSSSLOT Keys in request don't hash to the same slot
at parseError (/var/www/###/node_modules/redis-parser/lib/parser.js:179:12)
at parseType (/var/www/###/node_modules/redis-parser/lib/parser.js:302:14)

solution

import Queue from 'bull';

return new Queue(##, {
	prefix: '{queue}',
});

EfrosIonelu avatar Apr 30 '25 06:04 EfrosIonelu