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 />

Derived-types<br />

7 Derived-types<br />

7.1 Domains<br />

An <strong>AMQP</strong> domain defines a new type with a format identical to another type, but with a restricted range of<br />

values. In some cases a closed set of permitted values is formally restricted to a predetermined set of values,<br />

and in other cases an open set of restricted values is specified.<br />

7.2 Structs<br />

An <strong>AMQP</strong> struct defines a compound type. That is a type whose format is defined entirely in terms of other<br />

types. Each struct definition includes an ordered sequence of well known fields, each with a specified name,<br />

type, and multiplicity. A struct is encoded as a set of packing flags that indicate which fields are present,<br />

followed by the encoded field data for those fields that are present. Where fields are defined to permit<br />

multiple values, the encoded data for that field starts with a 4 OCTET count indicating how many values are<br />

present.<br />

The first and second octet of packing flags contain presence indicators for fields 1-8 and fields 9-16<br />

respectively. Within each octet the fields map in order from the least significant bit to the most significant<br />

bit. If a packing flag is set the corresponding field MUST be included in the encoded data. If a packing flag<br />

is not set the corresponding field MUST NOT be included in the encoded data. If the struct has fewer<br />

properties than packing flags the extra packing flags are reserved for future extension of the struct and<br />

MUST be set to zero.<br />

Structs are specifically defined by the command, control, and struct definitions within this document. Each<br />

definition includes a unique struct code for use with the struct primitive type as well as the order, name,<br />

type, and multiplicity of the struct fields.<br />

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

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

Saved successfully!

Ooh no, something went wrong!