Connection
AMQP 1.0 joins two containers by one connection, which carries sessions, and each session carries links that move messages one way.
The diagram as text
- One TCP connection: Session window shared by publishers; Sender link target receipts one per address; Session window of one subscription; Receiver link source orders credit 256
- Session: publish: Session window shared by publishers; Sender link target receipts one per address
- Session: orders: Session window of one subscription; Receiver link source orders credit 256
- Broker container: Node receipts a queue or a topic; Node orders a queue or a topic
- Service container container id ruststream → One TCP connection: TLS, SASL, open
- Sender link target receipts one per address → Node receipts a queue or a topic: transfers
- Node orders a queue or a topic → Receiver link source orders credit 256: transfers
- Link names are unique per connection; the crate derives them from the container id, as in ruststream-receiver-3
A container is a peer of the protocol: the service is one and the broker is another. The service
presents the container id ruststream unless
container_id names another, and a broker's
console lists the service's connection and links under it.
The connection is one TCP socket. On an amqps:// URL it starts with TLS. SASL then
authenticates the service with PLAIN, ANONYMOUS or EXTERNAL, and the two containers exchange
open.
A session is a pair of channels inside the connection, each with a window that bounds the transfers in flight on it. The crate begins one session that every publisher of the connection shares, and one more for each subscription. A slow subscription fills its own window, never the publishers' one or another subscription's.
A link is named and carries messages in one direction. A sender link goes from the service to a node, and a receiver link from a node to the service. Each end of a link is a terminus, and the terminus on the broker's side names a node by its address. A link also has a credit of its own, which Transfers draws.
The standard fixes the frames on the wire, not what an address means. Whether orders is a queue
or a topic is the broker's decision, which Addresses draws.