On 18/10/2019 06:43, Dweep Sharma wrote:
I have been using redis pub/sub to  exchange messages between server and client(browser), the advantage with redis for short lived messages is the channels in redis can be unsubscribed and are removed if no longer needed.

You've got three ways of using redis for messaging:

* Pub/sub.  Messages are not stored anywhere.  If a subscriber is disconnected at the time a message is published, they never see it.

* List queues (e.g. LPUSH/RPOP).  A single queue: messages are stored, but shared out between subscribers.  Each message is only delivered to a single recipient.

* Streams - new in redis 5.0 - which are closer to the Kafka/Pulsar model.  Messages are written to a stream: multiple subscribers can read the same stream, or consumer groups can share the stream.  Disconnected consumers can continue at the same position when they reconnect.

Since you're talking about pub/sub, then you don't care about reliable delivery of all messages - so maybe you don't need something like Pulsar.

Reply via email to