wire / wire-format / amqp-frame
AMQP (Advanced Message Queuing Protocol) 0-9-1 frames: 1-byte type (1 method, 2 header, 3 body, 4 heartbeat), 2-byte channel (big-endian), 4-byte size (big-endian), payload, 1-byte frame end (0xCE). Method frames contain a class ID (2 bytes) and method ID (2 bytes) plus arguments.
aka: AMQP 0-9-1 frame
spec: AMQP 0-9-1 specification
AMQP (Advanced Message Queuing Protocol) 0-9-1 frames: 1-byte type (1 method, 2 header, 3 body, 4 heartbeat), 2-byte channel (big-endian), 4-byte size (big-endian), payload, 1-byte frame end (0xCE). Method frames contain a class ID (2 bytes) and method ID (2 bytes) plus arguments.
| field | size | meaning |
|---|---|---|
| Type | 1 byte | 1 method, 2 content header, 3 content body, 4 heartbeat, 8 (used by some implementations). |
| Channel | 2 bytes (uint16, big-endian) | Channel number (0 for connection-level methods). |
| Size | 4 bytes (uint32, big-endian) | Size of the payload (excluding the frame end byte). |
| Payload | = size | Method arguments, content header properties, or body data. |
| Frame end | 1 byte | 0xCE (frame delimiter). |
| Method frame payload | variable | Class ID (2 bytes) + Method ID (2 bytes) + method-specific arguments. |
| Content header | variable | Class ID (2) + weight (2) + body size (8) + property flags (2) + property values. |
example:
01 00 00 00 00 00 08 00 0a 00 00 00 00 00 00 00 ce
AMQP method frame: type 1, channel 0, size 8, class 10 (connection), method 10 (start-ok)
agent: curl -H 'accept: application/json' wire.phall.io/wire-format/amqp-frame
or /wire-format/amqp-frame.json