feathersjs-ecosystem / feathers-sync

Synchronize service events between Feathers application instances
MIT License
222 stars 41 forks source link

Multiple services using the same Redis #73

Closed noahprince22 closed 6 years ago

noahprince22 commented 6 years ago

If multiple services on the same cluster use the same redis client with feathers-sync, there's a possibility for collisions. This will only happen if the services have the same name, but it's still something to be concerned about.

If I get time I'll do a PR to fix it, should probably just need to add an option like prefix for redis, and change https://github.com/feathersjs-ecosystem/feathers-sync/blob/6c3f14a2bbc9e8d67f038e2a761fd80e831ff55a/src/redis.js#L18

For now we're just using AMQP for one service and Redis for the other, since we have both.

daffl commented 6 years ago

In the next version, only one Redis key is being subscribed to and you can set it in the options to avoid name clashes.