Connections
import { Queue, Worker } from 'bullmq';
// Create a new connection in every instance
const myQueue = new Queue('myqueue', {
connection: {
host: 'myredis.taskforce.run',
port: 32856,
},
});
const myWorker = new Worker('myqueue', async job => {}, {
connection: {
host: 'myredis.taskforce.run',
port: 32856,
},
});import { Queue } from 'bullmq';
import IORedis from 'ioredis';
const connection = new IORedis();
// Reuse the ioredis instance in 2 different producers
const myFirstQueue = new Queue('myFirstQueue', { connection });
const mySecondQueue = new Queue('mySecondQueue', { connection });maxRetriesPerRequest
maxRetriesPerRequestQueue
Last updated
Was this helpful?