The AMQP Format for CloudEvents defines how event attributes are expressed in the AMQP 1.0 Type System.
This document is a working draft.
CloudEvents is a standardized and transport-neutral definition of the structure and metadata description of events. This specification defines how the elements defined in the CloudEvents specification are to be represented in the [AMQP 1.0 Type System][amqp-types].
The Attributes section describes the naming conventions and data type mappings for CloudEvents attributes for use as AMQP message properties.
This specification does not define an envelope format. The AMQP type system's intent is primarily to provide a consistent type system for AMQP itself and not for message payloads.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC2119.
This section defines how CloudEvents attributes are mapped to the AMQP type-system. This specification does not explicitly map each attribute, but provides a generic mapping model that applies to all current and future CloudEvents attributes, including extensions.
The core CloudEvents specification defines a minimal abstract type system, which this mapping leans on.
The CloudEvents type system is mapped to AMQP types as follows:
CloudEvents | AMQP |
---|---|
String | string |
Binary | binary |
URI | string |
Timestamp | timestamp |
Map | map |
Any | See 2.3. |
Any
-typed CloudEvents values can either hold a String
, or a Binary
value, or a Map
. Map
entry values are also Any
typed. AMQP's type
system natively represents dynamic typing in its type system
encoding, and therefore immediately allows for the required
variant type representation.