diff --git a/spec/asyncapi.md b/spec/asyncapi.md index 1ca99b388..815e55565 100644 --- a/spec/asyncapi.md +++ b/spec/asyncapi.md @@ -563,6 +563,7 @@ Field Name | Type | Description ---|:---:|--- $ref | `string` | Allows for an external definition of this channel item. The referenced structure MUST be in the format of a [Channel Item Object](#channelItemObject). If there are conflicts between the referenced definition and this Channel Item's definition, the behavior is *undefined*. description | `string` | An optional description of this channel item. [CommonMark syntax](https://spec.commonmark.org/) can be used for rich text representation. +servers | [`string`] | The servers on which this channel is available, specified as an optional unordered list of names (string keys) of [Server Objects](#serverObject) defined in the [Servers Object](#serversObject) (a map). If `servers` is absent or empty then this channel must be available on all servers defined in the [Servers Object](#serversObject). subscribe | [Operation Object](#operationObject) | A definition of the SUBSCRIBE operation, which defines the messages produced by the application and sent to the channel. publish | [Operation Object](#operationObject) | A definition of the PUBLISH operation, which defines the messages consumed by the application from the channel. parameters | [Parameters Object](#parametersObject) | A map of the parameters included in the channel name. It SHOULD be present only when using channels with expressions (as defined by [RFC 6570 section 2.2](https://tools.ietf.org/html/rfc6570#section-2.2)). @@ -646,6 +647,40 @@ subscribe: ``` +Using explicit by-name references to the servers on which the channel is available: + +```json +{ + "description": "This application publishes WebUICommand messages to an AMQP queue on RabbitMQ brokers in the Staging and Production environments.", + "servers": [ + "rabbitmqBrokerInProd", + "rabbitmqBrokerInStaging", + ], + "subscribe": { + "message": { + "$ref": "#/components/messages/WebUICommand" + } + }, + "bindings": { + "amqp": { + "is": "queue" + } + } +} +``` + +```yaml +description: This application publishes WebUICommand messages to an AMQP queue on RabbitMQ brokers in the Staging and Production environments. +servers: + - rabbitmqBrokerInProd + - rabbitmqBrokerInStaging +subscribe: + message: + $ref: "#/components/messages/WebUICommand" +bindings: + amqp: + is: queue +```