Book Image

Building Scalable Apps with Redis and Node.js

By : Joshua Johanan
Book Image

Building Scalable Apps with Redis and Node.js

By: Joshua Johanan

Overview of this book

Table of Contents (17 chapters)
Building Scalable Apps with Redis and Node.js
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Message queuing in RabbitMQ


At this point, we have already covered a few of the exchange types, but we will cover all of them here. The first and simplest exchange type is direct. It works by matching the routing key to the routing key that the queue used when binding. If they match, the queue gets the message. The next type is topic. We used this in our PacktChat application. The routing key can be pattern based. This allows workers to select a broad range of messages easily. If you have designed your routing keys to be hierarchical, then you can easily create queues that are inclusive or exclusive. Our logging exchange is an example of this. The debug queue will get any message put in the queue that matches *.log. The error queue only gets messages that are specifically error.log. If we create a warn queue that matches warn.log, debug will still have all the messages. The next type is fanout. This type works as a broadcaster. Every queue that is bound to this exchange will get a message...