Closed caffeines closed 2 years ago
the code gets stuck forever inside RedisSMQ.createQueueAsync()
try calling process.exit(0)
at the end of your async node script. This worked for me
async function main() {
try {
const conn = new RedisSMQ({
host: config.redis.host,
port: config.redis.port,
password: config.redis.password,
ns: 'rsmq',
realtime: true,
});
console.log(`Creating queue...`)
await conn.createQueueAsync({ qname: "Q NAME"})
} catch (error) {
console.error(error)
process.exit(1)
}
process.exit(0)
}
main()
We have used
rsmq
successfully in ourdev
environment having bothredislab
connection and local docker instance of Redis. But in our production environment having AWS ElastiCache Redis instance inside a VPC, the code gets stuck forever insideRedisSMQ.createQueueAsync()
, although Redis connection succeeds instantly if this line is commented out.The sample code-flow of my scenario is like the following:
Is there any special requirement for AWS ElastiCache connection?