AMQP Frame Sequence Workbench

Inspect AMQP 0-9-1 method, header, body, and heartbeat frames as byte-level packets moving through shared channels.

animation
amqp
protocols
messaging
frames
Interactive AMQP frame animation showing the 7-byte frame header, frame-end marker, method/header/body/heartbeat frame types, Basic.Publish content sequence, body fragmentation, channel multiplexing, heartbeat behavior, and byte-level debugging cues.
AMQP 0-9-1 Wire format Channel multiplexing

AMQP Frame Sequence Workbench

Every AMQP 0-9-1 command or message is carried as frames. Use this workbench to see the shared 7-byte envelope, the type-specific payload, the frame-end marker, and how multiple channels share one TCP connection without mixing one message's content frames on the same channel.

Frame type Method 0x01
Channel 1 of 1-65535
Total bytes 21 bytes
Teaching focus Basic.Publish

1. Read the envelope

The first 7 bytes are always type, channel, and payload size. The final byte must be 0xCE.

2. Match the frame type

Methods are commands, headers are message properties, body frames carry bytes, and heartbeats keep idle connections alive.

3. Track the channel

Channel 0 is connection-level. Channels 1-65535 are virtual streams over the same socket.

4. Reassemble content

A content-carrying method is followed by exactly one header frame and zero or more body frames.

Scenario

Teaching knobs

24 B

Channel focus

Animation

Basic.Publish starts with a Method frame

The method frame tells the broker which command is being requested on this channel. For Basic.Publish, the content header and body frames follow on the same channel.

Method Header Body Heartbeat Frame error
Step 1 of 3
AMQP frame lanes Frame tokens move from client to broker over a shared socket, separated by channel lanes.

Byte Inspector

The strip keeps the real AMQP envelope shape constant while the payload explanation changes by frame type.

7-byte header + payload + CE
Select or step through a frame to inspect what each field means.
Frame count 3 frames
Body frames 1 body frame
Debug cue Frame-end OK
01 00 01 00 00 00 0C 00 3C 00 28 ... CE

Frame Timeline

Click a frame to jump to that point. Content frames for one message stay sequential on their channel; other channels may appear between them on the socket.

Channel 1 focus

Frame Envelope

  • type: 1 byte
  • channel: 2 bytes, big-endian
  • size: 4 bytes, payload length
  • frame-end: always 0xCE

Four Frame Types

  • 1: method command
  • 2: content header/properties
  • 3: content body bytes
  • 8: heartbeat on channel 0

Content Sequence

  • Content method first
  • Exactly one content header
  • Zero or more body frames
  • Body size comes from the header frame

Channel Multiplexing

  • One TCP socket can carry many channels.
  • Channel 0 handles connection-level traffic.
  • Application streams use channels 1-65535.

Fragmentation

  • Large content bodies can be split.
  • Receivers reassemble body frames.
  • Method and header frames are not body fragments.

Debugging Clues

  • Wrong 0xCE means framing error.
  • Heartbeat must use channel 0.
  • Payload length must match the size field.
Learning Support: common mistakes to spot

Do not treat one publish as one frame

A published message normally appears as a method frame, a content header frame, and one or more body frames. Debug traces often show this as several packets even though the application sent one logical message.

Do not put heartbeats on an application channel

Heartbeat frames are connection-level transport frames. In AMQP 0-9-1 they use frame type 8, channel 0, zero payload bytes, and the normal 0xCE frame end.

Do not interleave one channel's content

Frames from another channel can appear between frames on the shared socket, but content frames for a single message on a single channel must remain sequential.

Remember what size measures

The frame size field is the payload length, not the whole frame length. Total bytes are 7 + payload size + 1.

Protocol Notes and Source Baseline

Teaching model

The payload bytes shown here are compact teaching sketches. The envelope, frame types, channel rules, content sequence, body-size relationship, and heartbeat behavior follow AMQP 0-9-1.

Frame-max nuance

Body frames are the useful place to demonstrate fragmentation. RabbitMQ's AMQP 0-9-1 errata notes that method and content header frames cannot be split across multiple frames, so this workbench keeps them whole.

When learners should use this

Use it before packet capture analysis, broker troubleshooting, or reliability lessons where learners need to separate wire framing from messaging semantics.