← Back to the chapter

Technical detail · AMQP Connection and Channel Contracts

The four AMQP 0-9-1 frame kinds

AMQP 0-9-1 carries channel-tagged frames over a connection. A method frame carries a command such as basic.publish, queue.declare or basic.ack. A content header frame states a message’s body size and properties: delivery mode, content type, headers and correlation ID. Content body frames carry payload bytes, split according to the negotiated frame-max when necessary. Heartbeat frames use channel 0 when ordinary traffic is absent.

A publish therefore consists of a method frame, a content header frame and the required body frames on the same channel, in order. Channel 0 is reserved for connection-global control, including connection.start, connection.tune and heartbeats.

AMQP 1.0 replaces this framing model: it uses sessions, links and transfer frames rather than AMQP 0-9-1 channels and method frames. The frames-and-reliability chapter develops that separate wire protocol.

← Back to the chapter