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

Unable to connect with redis-clustr #121

Open
captmiddy opened this issue May 30, 2020 · 2 comments
Open

Unable to connect with redis-clustr #121

captmiddy opened this issue May 30, 2020 · 2 comments
Assignees

Comments

@captmiddy
Copy link

I am attempting to connect to AWS Redis Cluster, and it simply doesn't seem to work. On fullReady I am able to get the message that the queue is being created, but as soon as I attempt to create the new rsmq, it hangs and doesn't go to the next console message. Sometimes I will get a stack too deep message. If I put a get into the section before the first console.log, I will get the result, but the queue never seems to continue. Changing this to use the internal client fails due to the cluster on the backend, but does get passed the lock. Is the redis-clustr client not supported?

const RedisSMQ = require("rsmq");
require('dotenv').config();

const RedisClustr = require('redis-clustr');
const RedisClient = require('redis');

var redis = new RedisClustr({
    servers: [
        {
            host: process.env.REDIS_HOST,
            port: process.env.REDIS_PORT
        }
    ],
    createClient: function(port, host) {
    // this is the default behaviour
        return RedisClient.createClient(port, host);
    }
});

redis.on('fullReady', () => { 
    console.log("Creating Queue");
    const rsmq = new RedisSMQ({ client: redis, ns: 'rsmq'});
    console.log("Client Established");
    rsmq.createQueue({ qname: 'TestingQueue'}, (err) => {
        if(err) console.err(err);
        else console.log("Queue Established");
    })
});
@smrchy smrchy self-assigned this Jan 26, 2021
@smrchy
Copy link
Owner

smrchy commented Jan 26, 2021

Sorry for the late reply. I did not test Redis Cluster, yet. Did anybody get RSMQ with Redis Cluster to work? The main LUA script running could be a problem.

@GopherJ
Copy link

GopherJ commented Feb 4, 2021

I'm also interested in this question because we'd like to switch to Redis Cluster

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants