Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade node redis from v2.* to v4.* #481

Open
KiranI-Bsw opened this issue Apr 13, 2022 · 8 comments
Open

Upgrade node redis from v2.* to v4.* #481

KiranI-Bsw opened this issue Apr 13, 2022 · 8 comments
Assignees
Labels
dependencies Pull requests that update a dependency file enhancement
Milestone

Comments

@KiranI-Bsw
Copy link

I am using node redis v4.0.2 for my project. However, bee-queue uses v2.* and I am unable to reuse my redis client from v4. Gives somethig like this. I am not dropping out of v4 bcoz I can use promises with node redis itself. Due to this issue I have to open a new connection for bee-queue queue whereas I should have been able to use one. Any suggestion on how to deal with this?

node_modules/bee-queue/node_modules/redis/lib/utils.js:65
            var snake_case = elem.replace(/[A-Z][^A-Z]/g, '_$&').toLowerCase();
                                  ^

RangeError: Maximum call stack size exceeded
    at String.replace (<anonymous>)
    at clone (/Users/bswmac013/Documents/GitHub/redis-matchmaking/matchmaker-consumer/node_modules/bee-queue/node_modules/redis/lib/utils.js:65:35)
    at clone (/Users/bswmac013/Documents/GitHub/redis-matchmaking/matchmaker-consumer/node_modules/bee-queue/node_modules/redis/lib/utils.js:71:32)
    at clone (/Users/bswmac013/Documents/GitHub/redis-matchmaking/matchmaker-consumer/node_modules/bee-queue/node_modules/redis/lib/utils.js:71:32)
    at clone (/Users/bswmac013/Documents/GitHub/redis-matchmaking/matchmaker-consumer/node_modules/bee-queue/node_modules/redis/lib/utils.js:71:32)
    at clone (/Users/bswmac013/Documents/GitHub/redis-matchmaking/matchmaker-consumer/node_modules/bee-queue/node_modules/redis/lib/utils.js:71:32)
    at clone (/Users/bswmac013/Documents/GitHub/redis-matchmaking/matchmaker-consumer/node_modules/bee-queue/node_modules/redis/lib/utils.js:71:32)
    at clone (/Users/bswmac013/Documents/GitHub/redis-matchmaking/matchmaker-consumer/node_modules/bee-queue/node_modules/redis/lib/utils.js:71:32)
    at clone (/Users/bswmac013/Documents/GitHub/redis-matchmaking/matchmaker-consumer/node_modules/bee-queue/node_modules/redis/lib/utils.js:71:32)
    at clone (/Users/bswmac013/Documents/GitHub/redis-matchmaking/matchmaker-consumer/node_modules/bee-queue/node_modules/redis/lib/utils.js:71:32)

@acSpock
Copy link

acSpock commented Apr 13, 2022

I am running into this same issue @KiranI-Bsw . I'm looking to figure out a solution before we decide to move to google pubsub. I'll let you know what I find.

@KiranI-Bsw
Copy link
Author

KiranI-Bsw commented Apr 22, 2022

PS: I'm using redis v4.0.2

I've notice that the constructor name for redis client is actually Commander. I am new to nodejs ecosystem so do you have any workaround or solution for this?

function isClient(object) {
    if (!object || typeof object !== 'object') return false;
    const name = object.constructor.name;
    return name === 'Redis' || name === 'RedisClient';
}

Upon researchig around, I believe that lot of things would be simplified (or entirely eliminited) by using v4.

For now setting sendEvents and activateDelayedJobs to false in producer helps with reusing the connection but doesn't work with consumer.

@acSpock Have you found anything?

@avin-kavish
Copy link

I want this too. But it looks like the package is not being maintained anymore.

@compwright compwright added enhancement dependencies Pull requests that update a dependency file labels Nov 22, 2022
@compwright compwright self-assigned this Nov 22, 2022
@compwright
Copy link
Collaborator

@avin-kavish @KiranI-Bsw @acSpock I've come on recently as a new member of the maintainers team (and we'd like more if anyone is interested). This is high on the list to do next, FYI.

@sebaplaza
Copy link

This lib seems to be completely abandoned.

@pSnehanshu
Copy link

I wanted to use bull, but the job name thing is totally stopping me.

@romualdr
Copy link

romualdr commented Sep 20, 2023

@pSnehanshu I believe BullMQ (which is the successor of Bull) doesn't use names.

@pSnehanshu
Copy link

@romualdr BullMQ still has names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement
Projects
None yet
Development

No branches or pull requests

7 participants