Advanced Message Queuing protocol (3) logic model

Source: Internet
Author: User

Sessions

You must create a session to connect two nodes in different containers. session is the interaction between the two containers named, and provides a reliable and orderly Command Channel (forward and reverse) for the interaction ). Multiple sessions may exist between any two containers at the same time, and each session may have multiple links.

 

 

Commands
Session is a command channel. The command is the atomic unit of amqp work.

The command is used to create links between the source and target nodes of different containers, transfer information data, and issue and delete credit. Generally, commands are transmitted asynchronously in a session.

To ensure that a specific command has been executed by the receiving container, the sending container must wait for confirmation. Commands of amqp are not allowed to be executed in a disordered order. commands can be sorted by serial numbers. After the container is executed, a command containing the serial number of the last command will be returned (possibly an empty command ).

 

Transactions

Amqp also defines the transaction container, and the session defines the transaction model. In any session, there is at most one transaction container, and the other end is the Transaction Controller.

Amqp provides four transaction modes

1. Non-transaction mode

2. Local transaction mode

3. Distributed Transaction Mode

4. Advanced transaction mode

You can set the transaction model when creating a session. After the transaction model is created, it cannot be modified and the transaction model can be controlled at the Session Layer.

The transaction controller uses the txn command to organize the sending and receiving commands into transaction units.

 

Reference:Amqp 1.0 draft for review only revision 875

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.