0

I have tried everything to try and get Redis to work with Bull in my Nest.js app, but every time I try to run my task, it times out after retrying too many times. My code works perfectly with a host and port locally, but I can't seem to connect to this Redis Cloud instance.

Heroku gives you a REDISCLOUD_URL environment variable and I split it up to create the four variables below. I've tried every possible combination of parameters but no luck.

@Module({
  imports: [
    AppDataModule,
    BullModule.forRoot({
        redis: {
          host: AppConfig.REDIS.HOST,
          port: AppConfig.REDIS.PORT,
          username: AppConfig.REDIS.USERNAME,
          password: AppConfig.REDIS.PASSWORD,
          db: 0,
          tls: {
            rejectUnauthorized: false,
            requestCert: true,
          },
        }
      }
    ),
  ],
  exports: [BullModule],
})
export class MyQueue {}

0 Answers0