Search code examples
redisseneca

what is the difference between seneca redis pubsub transport and seneca redis queue transport?


I'm learning on how to get data from redis using seneca js but seneca provides multiple plugins to connect to redis. and available plugins are the ones mentioned in the title. which should I use just to fetch a couple of keys from redis? and what is the difference between the two?


Solution

  • seneca-redis-pubsub-transport and seneca-redis-queue-transport are both used for transporting messages between services using redis.

    seneca-redis-pubsub-transport is a broadcast transport. All subscribed services will receive all messages. seneca-redis-queue-transport on the other hand is a queue transport. Messages are sent to only one of possibly multiple subscribed services.

    If you only want to get/set some values that take a look at seneca-redis-store. This plugin allows you to get and set values using redis.