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

Adding message queues to PacktChat

We can now add message queues to the application we are building. Our application does not need credit card processing or transaction e-mails, but we will add logging through RabbitMQ. We will create a logging exchange and two queues, debug.log and error.log. The debug.log queue will log everything that comes through the exchange (including errors), and error.log will only log errors. We will do this by using a topic exchange.

Topic exchange

Our test applications have used a direct exchange. What this means is that the queue must use the same exact routing key that the message was published with. Topic exchanges allow pattern matching in the routing key. In our example, we will bind the debug.log queue with a routing ...

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