RabbitMQ Learning Series (a): Introduction

1 Introduction

RabbitMQ is a development of erlang based on AMQP (Advanced Message Queue) open source implementation of the agreement. In a distributed system for store and forward messages, in terms of ease of use, scalability, high availability, and so on are very good. It is one of the most current mainstream messaging middleware.
RabbitMQ's official website: http://www.rabbitmq.com

2、AMQP

The AMQP, is an open standard application-layer protocol for message-oriented middleware design. Message middleware mainly for decoupling between the components, sender of the message without knowing the user's presence message, likewise, the user need not know the existence of the message sender. AMQP main feature is a message for the queue, the routing (including point and publish / subscribe), reliability and safety.

3, System Architecture

Use message queue probably as follows:

    (1) Message Queuing clients connect to the server to open a channel.

    (2) a declaration client exchange, and provision of the relevant property.

    (3) The client declares a queue, and set the associated property.

    (4) The client uses routing key, establish a good relationship between the exchange and the binding queue.

    (5) the delivery message to the client exchange. After receiving the message exchange, according to the message and key binding has been set, route messages, the message delivered to one or more queue.

As shown below: AMQP say in two main components: Exchange and Queue

Green X is Exchange, red is the Queue, both of which are in the Server side, also known as Broker,

This is partly achieved RabbitMQ, while blue is the client, there are usually two types of Producer and Consumer.

4, several concepts

P: The sender of Producer, data.

C: the recipient is a Consumer, data.

Exchange: Message switch that specifies what the message according to the rules, which are routed to a queue.

Queue: vector message queue, each message will be put into one or more queues.

Binding: binding, its role is to exchange routing and queue bind in accordance with the rules.

Routing Key: routing keywords, exchange of messages delivered in accordance with this keyword.

vhost: web hosting, where a broker can offer more vhost, as a different user privilege separation.

channel: message channels, each client's connection can be established multiple channel, each channel representing a session task.

Reprinted from http://www.cnblogs.com/zhangweizhong/category/855479.html, thank you

Guess you like

Origin www.cnblogs.com/Paul-watermelon/p/11228278.html
Recommended