question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Connection to Redis

See original GitHub issue

bullmq: v1.0.1

I’m not sure how to pass the redis connection. I tried different opts like from the doc (https://docs.bullmq.io/guide/connections) but it either crash with error or connects to 127.0.0.1 am I doing something wrong ?

const IORedis = require('ioredis');

const queue = new Queue('myqueue', new IORedis(process.env.REDIS_URL));
const queueEvents = new QueueEvents('myqueueevents', new IORedis(process.env.REDIS_URL));

const worker = new Worker('myworker', async job => { ... }, new IORedis(process.env.REDIS_URL));

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:21 (9 by maintainers)

github_iconTop GitHub Comments

5reactions
lewisphamcommented, Mar 21, 2021

I think the docs should mention that QueueEvents and Worker does not reuse connections passed into Queue. So you need to pass the initialized connection to all QueueEvents, Worker and Queue if you want to reuse it. This behavior is actually quite weird imho. Shouldn’t QueueEvents and Worker reuse the connection passed into Queue by default? New connections could be internally created but their configurations should be reused right?

4reactions
dan003400commented, Jan 30, 2021

Is there any reason connection does not accept just a redis connection string without the need of importing ioredis?

This seems very odd that you can pass in host / port but not only a string with full connection string…

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Connect to a Redis Database - DigitalOcean
If you have redis-server installed locally, you can connect to the Redis instance with the redis-cli command: redis-cli. This will take you into ......
Read more >
Redis CLI
By default, redis-cli connects to the server at the address 127.0.0.1 with port 6379. You can change the port using several command line...
Read more >
How to connect to remote Redis server? - Stack Overflow
Host, port, password and database By default redis-cli connects to the server at 127.0.0.1 port 6379. As you can guess, you can easily...
Read more >
Redis - Commands - Tutorialspoint
To start Redis client, open the terminal and type the command redis-cli. This will connect to your local server and now you can...
Read more >
Connect to a Redis instance - Memorystore - Google Cloud
Connecting to a Redis instance using the read endpoint · Install telnet using apt-get : sudo apt-get install telnet · From the terminal,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found