Skip to content

Latest commit

 

History

History
93 lines (69 loc) · 3.69 KB

amqp-format.md

File metadata and controls

93 lines (69 loc) · 3.69 KB

AMQP Event Format for CloudEvents

Abstract

The AMQP Format for CloudEvents defines how event attributes are expressed in the AMQP 1.0 Type System.

Status of this document

This document is a working draft.

Table of Contents

  1. Introduction
  2. Attributes
  3. References

1. Introduction

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.

1.1. Conformance

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.

2. Attributes

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.

2.1. Base Type System

The core CloudEvents specification defines a minimal abstract type system, which this mapping leans on.

2.2. Type System Mapping

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.

2.3. Mapping Any-typed Attributes

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.

3. References

  • RFC2046 Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types
  • RFC2119 Key words for use in RFCs to Indicate Requirement Levels
  • [OASIS-AMQP-1.0][OASIS-AMQP-1.0] OASIS Advanced Message Queuing Protocol (AMQP) Version 1.0