Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Fetching latest commit…

Cannot retrieve the latest commit at this time

..
Failed to load latest commit information.
README.md
amqp-hacks.js
emit_log.js
new_task.js
package.json
receive.js
receive_logs.js
send.js
worker.js

README.md

Node.js code for RabbitMQ tutorials

Here you can find Node.js code examples from RabbitMQ tutorials.

To successfully use the examples you will need a running RabbitMQ server.

Requirements

Apart from npm and node, to run this code you need node-amqp version 0.1.X. To pull the dependency from npm run:

npm install amqp

Code

Tutorial one: "Hello World!":

node send.js
node receive.js

Tutorial two: Work Queues:

node new_task.js "A very hard task which takes two seconds.."
node worker.js

Tutorial three: Publish/Subscribe:

node receive_logs.js
node emit_log.js "info: This is the log message"
Something went wrong with that request. Please try again.