Automattic / kue

Kue is a priority job queue backed by redis, built for node.js.
http://automattic.github.io/kue
MIT License
9.46k stars 867 forks source link

Add support for tls connections #1193

Closed kHRISl33t closed 6 years ago

kHRISl33t commented 6 years ago

https://github.com/Automattic/kue/blob/87d61503d3d9cc024633efc7611bd25551f0f87d/lib/redis.js#L28

Please add support for using 'rediss://... for the protocol in a redis_url. It will enable a TLS socket connection.

kHRISl33t commented 6 years ago

There is a way to provide rediss://:

const redis = require('redis');
const kue = require('kue');

const q = kue.createQueue({
  prefix: 'q',
  redis: {
    createClientFactory: () => redis.createClient(config.redis.connectionString, {tls: true}),
  },
});

With this its not throwing any errors and it can connect to ElastiCache Redis. Sorry for the rushed open issue, you guys can close it now.