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