Here you can find JavaScript (Node) code examples from RabbitMQ tutorials.
To successfully use the examples you will need a running RabbitMQ server.
You need Node.js and amqp.node to run these tutorials.
To install amqp.node using npm:
npm install amqplib -gnode src/send.js
node src/receive.jsnode src/new_task.js "A very hard task which takes two seconds.."
node src/worker.jsTutorial three: Publish/Subscribe
node src/receive_logs.js
node src/emit_log.js "info: This is the log message"node src/receive_logs_direct.js info
node src/emit_log_direct.js info "The message"node src/receive_logs_topic.js "*.rabbit"
node src/emit_log_topic.js red.rabbit Hellonode src/rpc_server.js
node src/rpc_client.js 30