mcollina / mqemitter-redis

Redis-powered MQEmitter
MIT License
47 stars 27 forks source link

How to connect to the redis sharded cluster? #82

Open savyad opened 1 year ago

savyad commented 1 year ago

how can we connect to a redis cluster. Like ioredis does provide way to connect to the redis cluster.

mcollina commented 1 year ago

this accepts the same options of ioredis

savyad commented 1 year ago

in ioredis to connect to the cluster you need to create a separate instance of the cluster like this. const cluster = new Redis.Cluster([ { port: 6380, host: "127.0.0.1", }, { port: 6381, host: "127.0.0.1", }, ]);