rabbitmq-tutorials/javascript-nodejs
Marek Majkowski eefd0bfeb6 cosmetic
2012-04-17 17:13:43 +01:00
..
amqp-hacks.js node: Fixes to second 2012-04-17 17:05:17 +01:00
emit_log.js node: third tutorial 2012-04-17 17:04:41 +01:00
new_task.js node: Fixes to second 2012-04-17 17:05:17 +01:00
package.json first node.js tutorial 2012-04-17 16:03:34 +01:00
README.md cosmetic 2012-04-17 17:13:43 +01:00
receive_logs.js node: third tutorial 2012-04-17 17:04:41 +01:00
receive.js cosmetic 2012-04-17 17:05:26 +01:00
send.js node: second tutorial 2012-04-17 16:30:58 +01:00
worker.js cosmetic 2012-04-17 17:05:26 +01:00

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"