|
|
|
|
|
by bjt
3707 days ago
|
|
> For smaller operations Redis is more than enough for pub/sub. I didn't find that to be so at my last job, one of those smaller operations. With Redis you're forced to pick between two severely constrained options: 1. Use PUBLISH/SUBSCRIBE. This is nice if you want to have several listeners all receive the same message. But if a listener is down, there's no way for it to recover a message that it missed. If there is no one listening, messages are just dropped. 2. Use LPUSH/BRPOP. This is nice if you want to have several workers all pulling from the same queue, but isn't sufficient if you want to have several queues streaming from the same topic. (E.g. one listener is responsible for syncing to ElasticSearch and another one is syncing to your analytics DB.) I strongly prefer RabbitMQ. Its model of exchanges and queues supports mixing and matching these semantics much more flexibly. |
|
However RabbitMQ is also pretty fragile and terrible at scaling. NATS.io is another system that's got the messaging right and is working on persistence soon.