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

Sending messages back

Our first application that we built in this chapter is very simple. It had one queue, where the publisher did not care what happened to the job and the worker did not have to let the publisher know the job was done. We will cover one more example of message queues. We are now going to create an application where the publisher needs to know when the worker is done. A great example of this is charging a credit card. We are not going to build out an entire charging application, but we will mimic one. Let's build it! Create another folder named rabbit_second, and create a package.json file with the following code (remember to run npm install in order to get all the packages):

{ "dependencies": { "amqp": "0.2.0", "socket.io": "1.0.6" ...

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