1 Star 0 Fork 0

zhzhouq9/rabbitmq-tutorials

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
bin/travisci
clojure
common-lisp
dart
dotnet-visual-studio
dotnet
elixir
erlang
go
haskell
java-idea
java-mvn
java
javascript-nodejs
src
README.md
package-lock.json
package.json
kotlin
objective-c
perl
php-amqp
php-interop
php
python
ruby
rust
scala
soapui
spring-amqp
swift
.gitignore
.travis.yml
LICENSE.txt
Makefile
README.md
test.py
travisci.py
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/zhzhouq9/rabbitmq-tutorials.git
git@gitee.com:zhzhouq9/rabbitmq-tutorials.git
zhzhouq9
rabbitmq-tutorials
rabbitmq-tutorials
master

搜索帮助