rabbitmq-tutorials/javascript-nodejs
dependabot[bot] 3d5daf6797
Bump url-parse from 1.5.6 to 1.5.8 in /javascript-nodejs
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.6 to 1.5.8.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.6...1.5.8)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-28 04:13:34 +00:00
..
src Update two more variables 2019-04-19 23:02:43 +03:00
package-lock.json Bump url-parse from 1.5.6 to 1.5.8 in /javascript-nodejs 2022-02-28 04:13:34 +00:00
package.json Bump url-parse from 1.5.6 to 1.5.8 in /javascript-nodejs 2022-02-28 04:13:34 +00:00
README.md Node: README formatting 2021-06-29 07:47:16 +03:00

Node.js code for RabbitMQ tutorials

Here you can find JavaScript (Node) code examples from RabbitMQ tutorials.

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

Requirements

Node.js

You need Node.js and amqp.node to run these tutorials.

Client Library

To install amqp.node using npm:

npm install amqplib -g

Code

Tutorial one: "Hello World!":

node src/send.js
node src/receive.js

Tutorial two: Work Queues:

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

Tutorial three: Publish/Subscribe

node src/receive_logs.js
node src/emit_log.js "info: This is the log message"

Tutorial four: Routing:

node src/receive_logs_direct.js info
node src/emit_log_direct.js info "The message"

Tutorial five: Topics:

node src/receive_logs_topic.js "*.rabbit"
node src/emit_log_topic.js red.rabbit Hello

Tutorial six: RPC:

node src/rpc_server.js
node src/rpc_client.js 30