Answers for "ReplyError: CROSSSLOT Keys in request don't hash to the same slot"

0

ReplyError: CROSSSLOT Keys in request don't hash to the same slot

const Queue = require('bull')
const Redis = require('ioredis')

const clusterQueue = new Queue('Name', {
	prefix: '{clusterQueue}',
	createClient: () =>
		new Redis.Cluster([
			{ host: '127.0.0.1', port: 6379 },
			{ host: '127.0.0.1', port: 6380 },
			{ host: '127.0.0.1', port: 6381 }
		])
})

clusterQueue.process((job, done) => {
	console.log(job.data)
	done()
})

clusterQueue.add({ heroe: 'superman' })
Posted by: Guest on February-23-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language