Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

resolve IMPORTANT! Eviction policy is volatile-lru. It should be "noeviction" while using bullmq in node js

I am getting this warning on my terminal while using bullmq on my node express ts project

resolve IMPORTANT! Eviction policy is volatile-lru. It should be "noeviction" while using bullmq in node js

this is the code currently in basic implementation

import { Queue, Worker } from 'bullmq';

const redisConnection = {
  host: '',
  port: ,
  password: '',
  username: '',
};
export const carQueue = new Queue('Cars', {
  connection: redisConnection,
});
export const worker = new Worker('Cars', async (job: any) => {
  console.log(job.data);
  return "done";
}, { connection: redisConnection });

I have tried chat gpt and bing ai but wasn't helpful, the docs on bullmq regarding this wasn't too clear

like image 911
Scott Lexium Avatar asked Oct 23 '25 21:10

Scott Lexium


1 Answers

It's about Redis eviction policy. Your instance uses the default configuration, which evicts old keys in case it runs out of memory. Bull warns you about this because this could potentially cause some messages to get lost. More information here: https://docs.redis.com/latest/rs/databases/memory-performance/eviction-policy/

like image 181
Tadeusz Niemiec Avatar answered Oct 25 '25 12:10

Tadeusz Niemiec



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!