27.01.2014 Views

AMQP Specification Transport

AMQP Specification Transport

AMQP Specification Transport

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>AMQP</strong> <strong>Specification</strong>.<br />

Basic-types<br />

6 Basic-types<br />

Each <strong>AMQP</strong> type defines a format for encoding a particular kind of data. Additionally, most <strong>AMQP</strong> types are<br />

assigned a unique code that functions as a discriminator when more than one type may be encoded in a given<br />

position.<br />

<strong>AMQP</strong> types broadly fall into two categories: fixed-width and variable-width. Variable-width types are<br />

always prefixed by a byte count of the encoded size, excluding the bytes required for the byte count itself.<br />

Unless otherwise specified, <strong>AMQP</strong> uses network byte order for all numeric values.<br />

A type code is a single octet which may hold 256 distinct values. Ranges of types are mapped to specific<br />

sizes of data so that an implementation can easily skip over any data types not natively supported.<br />

Code Category Format<br />

==============================================================================<br />

0x00 - 0x0F Fixed Width One octet of data.<br />

0x10 - 0x1F Fixed Width Two octets of data.<br />

0x20 - 0x2F Fixed Width Four octets of data.<br />

0x30 - 0x3F Fixed Width Eight octets of data.<br />

0x40 - 0x4F Fixed Width Sixteen octets of data.<br />

0x50 - 0x5F Fixed Width Thirty-two octets of data.<br />

0x60 - 0x6F Fixed Width Sixty-four octets of data.<br />

0x70 - 0x7F Fixed Width One hundred twenty-eight octets of data.<br />

0x80 - 0x8F Variable Width One octet of size, 0-255 octets of data.<br />

0x90 - 0x9F Variable Width Two octets of size, 0-65535 octets of data.<br />

0xA0 - 0xAF Variable Width Four octets of size, 0-4294967295 octets of data.<br />

0xB1 - 0xBF Reserved<br />

0xC0 - 0xCF Fixed Width Five octets of data.<br />

0xD0 - 0xDF Fixed Width Nine octets of data.<br />

0xE0 - 0xEF Reserved<br />

0xF0 - 0xFF Fixed Width Zero octets of data.<br />

The particular type code ranges were chosen with the following rationale in mind:<br />

<strong>AMQP</strong> <strong>Transport</strong> v. 1-0 Page 63 of 83

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!