feathersjs-ecosystem / feathers-sync

Synchronize service events between Feathers application instances

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to use feathers-sync with sentinel setup

anveshr1 opened this issue · comments

As node_redis does not support sentinel connectivity I'm unable to use the feathers-sync with the existing setup using sentinel. Can we have something like a redisClient which is created using ioredis and pass it in config and sync could in turn use this client rather than creating a new client using redis ?
Something like below:

const Redis = require('ioredis');
const options = {
  sentinels: [
    {
      host: 'xxxxx',
      port: '26379'
    }
  ],
  name: 'mymaster',
  password: 'xxxxx'
};
client = new Redis(options)
app.configure(
  sync.redis({
    client: redisClient
  })
);
and then in adapters/redis.js
const pub = config.client || redis.createClient(db);
const sub = config.client || redis.createClient(db);

Thanks in Advance