amqp

Found an error? Have a suggestion?Edit this page on GitHub

AMQP 0-9-1 Bindings

This document defines how to describe AMQP-specific information on AsyncAPI.

Version

Current version is 0.3.0.

Server Binding Object

This object MUST NOT contain any properties. Its name is reserved for future use.

Channel Binding Object

This object contains information about the channel representation in AMQP.

Fixed Fields
Field NameTypeDescription
isstringDefines what type of channel is it. Can be either queue or routingKey (default).
exchangeMap[string, any]When is=routingKey, this object defines the exchange properties.
exchange.namestringThe name of the exchange. It MUST NOT exceed 255 characters long.
exchange.typestringThe type of the exchange. Can be either topic, direct, fanout, default or headers.
exchange.durablebooleanWhether the exchange should survive broker restarts or not.
exchange.autoDeletebooleanWhether the exchange should be deleted when the last queue is unbound from it.
exchange.vhoststringThe virtual host of the exchange. Defaults to /.
queueMap[string, any]When is=queue, this object defines the queue properties.
queue.namestringThe name of the queue. It MUST NOT exceed 255 characters long.
queue.durablebooleanWhether the queue should survive broker restarts or not.
queue.exclusivebooleanWhether the queue should be used only by one connection or not.
queue.autoDeletebooleanWhether the queue should be deleted when the last consumer unsubscribes.
queue.vhoststringThe virtual host of the queue. Defaults to /.
bindingVersionstringThe version of this binding. If omitted, "latest" MUST be assumed.

This object MUST contain only the properties defined above.

Example
1channels:
2  userSignup:
3    address: 'user/signup'
4    bindings:
5      amqp:
6        is: routingKey
7        exchange:
8          name: myExchange
9          type: topic
10          durable: true
11          autoDelete: false
12          vhost: /
13        bindingVersion: 0.3.0
1channels:
2  userSignup:
3    address: 'user/signup'
4    bindings:
5      amqp:
6        is: queue
7        queue:
8          name: my-queue-name
9          durable: true
10          exclusive: true
11          autoDelete: false
12          vhost: /
13        bindingVersion: 0.3.0

Operation Binding Object

This object contains information about the operation representation in AMQP.

Fixed Fields
Field NameTypeApplies To ActionDescription
expirationintegerreceive, sendTTL (Time-To-Live) for the message. It MUST be greater than or equal to zero.
userIdstringreceive, sendIdentifies the user who has sent the message.
cc[string]receive, sendThe routing keys the message should be routed to at the time of publishing.
priorityintegerreceive, sendA priority for the message.
deliveryModeintegerreceive, sendDelivery mode of the message. Its value MUST be either 1 (transient) or 2 (persistent).
mandatorybooleanreceiveWhether the message is mandatory or not.
bcc[string]receiveLike cc but consumers will not receive this information.
timestampbooleanreceive, sendWhether the message should include a timestamp or not.
ackbooleanSubscribeWhether the consumer should ack the message or not.
bindingVersionstringreceive, sendThe version of this binding. If omitted, "latest" MUST be assumed.

This object MUST contain only the properties defined above.

Example
1operations:
2  userSignup:
3    channel: 
4      $ref: '#/channels/userSignup'
5    bindings:
6      amqp:
7        expiration: 100000
8        userId: guest
9        cc: ['user.logs']
10        priority: 10
11        deliveryMode: 2
12        mandatory: false
13        bcc: ['external.audit']
14        timestamp: true
15        ack: false
16        bindingVersion: 0.3.0

Message Binding Object

This object contains information about the message representation in AMQP.

Fixed Fields
Field NameTypeDescription
contentEncodingstringA MIME encoding for the message content.
messageTypestringApplication-specific message type.
bindingVersionstringThe version of this binding. If omitted, "latest" MUST be assumed.

This object MUST contain only the properties defined above.

1channels:
2  userSignup:
3    address: 'user/signup'
4    messages:
5      userSignupMessage:
6        bindings:
7          amqp:
8            contentEncoding: gzip
9            messageType: 'user.signup'
10            bindingVersion: 0.3.0
Was this helpful?
Help us improve the docs by adding your contribution.
OR
Github:AsyncAPICreate Issue on GitHub