Skip to content

AMQP 0-9-1 Channel Binding v0.1.0

The AMQP channel binding v0.1.0 defines how AsyncAPI channels map to AMQP 0-9-1 exchanges and queues. This is a legacy version of the binding that supports basic exchange and queue configuration.

Overview

AMQP channel bindings support two main channel types:

  • Routing Key Channels (is: routingKey): Define exchange configurations for message routing.
  • Queue Channels (is: queue): Define queue configurations for message storage.

Channel Types

Routing Key Channels

Defines an exchange for message routing.

Exchange Properties

PropertyTypeRequiredDescription
typestringYesExchange type: topic, direct, fanout, default, or headers.
namestringYesThe name of the exchange (max 255 characters).
durablebooleanNoWhether the exchange survives broker restarts.
autoDeletebooleanNoWhether the exchange is deleted when the last queue is unbound from it.

Queue Channels

Defines a queue for message storage.

Queue Properties

PropertyTypeRequiredDescription
namestringYesThe name of the queue (max 255 characters).
durablebooleanNoWhether the queue survives broker restarts.
exclusivebooleanNoWhether the queue is used by only one connection.
autoDeletebooleanNoWhether the queue is deleted when the last consumer unsubscribes.

Examples

Topic Exchange with Routing Key

yaml
channels:
  userEvents:
    bindings:
      amqp:
        is: routingKey
        exchange:
          name: user-events
          type: topic
          durable: true
          autoDelete: false
        bindingVersion: '0.1.0'

Durable Queue

yaml
channels:
  orderQueue:
    bindings:
      amqp:
        is: queue
        queue:
          name: order-processing-queue
          durable: true
          exclusive: false
          autoDelete: false
        bindingVersion: '0.1.0'

Migration Guide to v0.2.0

Version 0.2.0 introduced the vhost property for both exchange and queue objects. This allows for specifying the virtual host, which provides a way to segregate applications using the same AMQP broker.