RabbitMQ

作者: Gundy_ | 来源:发表于2018-12-06 10:59 被阅读1次

概念

1、AMQP:Advanced Message Queuing Protocol,是一个提供统一消息服务的应用层标准协议。

2、IPC(单一系统进程间通信) -> socket(不同机器间进程通信) -> AMQP(解决大型系统模块与组件间通信)

3、RabbitMQ 基于 Erlang 开发,是 AMQP 的一个开源实现。

4、RabbitMQ 系统架构图: image

5、名词术语:

  • RabbitMQ Server(broker server):维护一条从 Producer 到 Consumer 的路线,保证数据能够按照指定的方式进行传输;

  • Client A & B:数据发送方,Producers create messages and publish (send) them to a broker server (RabbitMQ),一个有效的 Message 包含 payload 和 label 两部分

  • Client 1、2、3:数据消费方,Consumers attach to a broker server (RabbitMQ) and subscribe to a queue

  • Exchange:Exchanges are where producers publish their messages

  • Queue: Queues are where the messages end up and are received by consumers

  • Binding:Bindings are how the messages get routed from the exchange to particular queues
    还有几个隐式的概念:

  • Connection:Producer 和 Consumer 通过 TCP 连接到 RabbitMQ

  • Channel:它建立在上述的 TCP 连接中,数据流动都是在 Channel 中进行的
    此外,Exchanges 分三种类型:

  • direct:如果 routing key 匹配,那么 Message 就会被传递到相应的 queue

  • fanout:会向响应的 queue 广播

  • topic:对 key 进行模式匹配,比如 ab* 可以传递到所有 ab* 的 queue

相关文章

网友评论

    本文标题:RabbitMQ

    本文链接:https://www.haomeiwen.com/subject/vmmncqtx.html