Basic knowledge about amqp in openstack Message Queue

Source: Internet
Author: User

Amqp Model


Amqp has several important concepts

Producer: Message sender. Creates a message, fills in the message content (such as the routing Key), and sends the message to exchange.

Exchange: Receives messages from the producer and distributes messages to the corresponding Queue according to the configuration in bindings.

Bindings: Describes the relationship between exchange and queue. Exchange determines the queue to which the message is distributed based on the message content (routing key) and binding configuration.

Queue: Stores messages and passes them to the final consumer.

Consumer: The actual user of the message. A consumer can subscribe to multiple queue to receive messages in the queue.


Exchange type

Amqp exchange can be divided into the following types:

    • Direct Exchange

Direct is similar to express delivery in our life. Fill in the address of the other party. The Post Office will deliver the mail based on the unique address.

1) [Producer] In the message body, fill in the routing key2) [Exchange] based on the routing key, search for the queue3 bound to the routing key in the binding) [Exchange] to send the message to the queue

    • Topic exchange


Topic exchange is similar to direct exchange, but topic Exchange supports fuzzy match (#, *, etc)

A topic is similar to a newspaper subscription in our life. After subscribing to a magazine using the keyword "Sports", the Post Office will send you "Sports Weekly" and "Sports Daily"

1) [Producer] In the message body, fill in the routing key2) [Exchange] According to the routing key, in the binding, through fuzzy match, find the queue3 bound to the routing key) [Exchange] Send a message to the queue

    • Fanout exchange


Fanout exchange does not require any routing keyfanout, which is similar to broadcasting in our daily life. Anyone who does not need to subscribe to it can listen to fanout exchange and send the message to all bound queue.

Basic knowledge about amqp in openstack Message Queue

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.