I’m using the very basic example (const queue = new Queue('Paint')
) from the https://www.npmjs.com/package/bullmq page – everything works fine (it defaults to localhost:6379
).
However when I add a connection (new Queue('Paint', { connection })
) that’s based on a TLS access to Redis (rediss://...
), I can still push jobs into the queue (which I see in the Redis itself), but none of these jobs get pulled by the worker.
Maybe I’m missing some hidden flag?
Thanks!
-Dror
2
Answers
I found out what happened - although I'm still not sure why:
I was using ioredis as the connection for bull when the problem surfaced. When I replaced it with redis it started working properly, pulling jobs out of the queue.
Both packages has full support for Redis over TLS, but for some reason the integration with bull didn't work out for ioredis.
-Dror
This happens due to manual and incomplete parsing of redis url here: https://github.com/OptimalBits/bull/blob/develop/lib/queue.js#L308
rediss:// vs redis:// is simply not taken into account.
To workaround this issue I had to add more keys to additional ‘redis’ key: