RabbitMQ
what
MQ-message queue
三足鼎立
rocketmq -Made by Java 吞吐量高一些 阿里中间件
rabbitmq -Made by Erlang
Kafka-
以后有更多的了解再补充性能/功能差距
why
功能:解耦(双方通过mq交互)、异步、削峰
应用:
- 阿里双11
问题:
- 处理好新增的复杂性
- 处理好系统可用性
how
之所以选择rabbitmq是因为rocketmq的nameserver所需要的内存太大了,更何况boker,对于1C2G的乞丐机器来说根本跑不起来
1.docker run
Because of rocketmq need more than
1 | docker pull rabbitmq:management |
2.Usage
1.open chrome and input ‘localhost:15672’ or ‘192.168.1.1:15672’ then you can touch rabbitmq UI
Overview–the queued msg, msg rate in your server, some global counts, your nodes stats (if u use the above method,you only see one node in the screen ),you also can build a cluster with more nodes
Connections–
Channels–
Exchanges–direct,fanout,headers,match,trace,topic
Queses–
Admin–users management with passport && permission
2.use 5672 in your code
1 | amqp.connect({ |
more in official docs–> I’m doc
or some blogs–>I’m blog
or my GitHub–>click here