O'Reilly logo

Building Scalable Apps with Redis and Node.js by Joshua Johanan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Redis as a message queue

In addition to being a super-fast data store, Redis also does message queuing! We just spent the previous chapter covering message queues, so we don't have to cover the reason as to why we should use them. We will only cover how Redis uses them.

Redis's message queuing is much simpler than RabbitMQ. RabbitMQ has many different types of exchanges, queues, protocols, and many other features that Redis does not try to match. Redis is super simple message sending. The method we are using here is publish/subscribe. Redis can also do simple message queuing like RabbitMQ, using RPOPLPUSH. Redis Pub/Sub broadcasts published messages with anyone that is currently subscribed. It does not actually queue the messages. This is ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required