smrchy/rsmq

Specify redis db in options

HeberLemus opened this issue · 1 comments

cant seem to specify which redis db to use via the options object. am i setting this incorrectly?

what i have as settings:
redisMQ: { host: 'hostname', port: port, ns: 'rsmq-development', options: { db: 3 }, },
and feeding that into
const rsmq = new RMSQ(settings.redisMQ);

but when i check using Another Redis Desktop Manager, i see everything happening on the default db 0. have i read this incorrectly?

As a solution, I think you can create a redis client instance with the db option set to whatever db you need (node-redis lib, with the createClient method) then pass the client to the rsmq constructor via the client option.