From 712736e191caa1f08086aa917749d52102e511c2 Mon Sep 17 00:00:00 2001 From: Timon Back Date: Tue, 27 Aug 2024 18:25:12 +0200 Subject: [PATCH 1/6] feat: add amqp routing information to channelOperation --- amqp/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/amqp/README.md b/amqp/README.md index 6f2781b6..bce1ab41 100644 --- a/amqp/README.md +++ b/amqp/README.md @@ -29,6 +29,8 @@ This object contains information about the channel representation in AMQP. Field Name | Type | Description ---|:---:|--- `is` | string | Defines what type of channel is it. Can be either `queue` or `routingKey` (default). +`name` | string | When `is`=`routingKey`, this defines the actual routing pattern to route the message from the exchange to the queue. +`channel.$ref` | string | When `is`=`routingKey`, this defines the target queue after routing the message (essentially the binding). `exchange` | Map[string, any] | When `is`=`routingKey`, this object defines the exchange properties. `exchange.name` | string | The name of the exchange. It MUST NOT exceed 255 characters long. `exchange.type` | string | The type of the exchange. Can be either `topic`, `direct`, `fanout`, `default` or `headers`. @@ -54,6 +56,9 @@ channels: bindings: amqp: is: routingKey + name: routing.pattern + channel: + $ref: #/components/channels/userSignup exchange: name: myExchange type: topic From 3b37c0a43db09212442bc475c2b32be7d54e83c5 Mon Sep 17 00:00:00 2001 From: Timon Back Date: Mon, 28 Oct 2024 19:19:45 +0100 Subject: [PATCH 2/6] feat: update example channelIds --- amqp/README.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/amqp/README.md b/amqp/README.md index bce1ab41..edcd836f 100644 --- a/amqp/README.md +++ b/amqp/README.md @@ -51,14 +51,14 @@ This object MUST contain only the properties defined above. ```yaml channels: - userSignup: - address: 'user/signup' + userSignupExchange: + address: 'user.signup' bindings: amqp: is: routingKey - name: routing.pattern + name: user.signup channel: - $ref: #/components/channels/userSignup + $ref: #/components/channels/userSignupQueue exchange: name: myExchange type: topic @@ -70,8 +70,8 @@ channels: ```yaml channels: - userSignup: - address: 'user/signup' + userSignupQueue: + address: 'user.signup' bindings: amqp: is: queue @@ -113,7 +113,7 @@ This object MUST contain only the properties defined above. operations: userSignup: channel: - $ref: '#/channels/userSignup' + $ref: '#/channels/userSignupQueue' bindings: amqp: expiration: 100000 @@ -147,8 +147,7 @@ This object MUST contain only the properties defined above. ```yaml channels: - userSignup: - address: 'user/signup' + userSignupQueue: messages: userSignupMessage: bindings: From f3a5c7baaf6e1fb083673d76eb9fd867ec058b53 Mon Sep 17 00:00:00 2001 From: Timon Back Date: Mon, 28 Oct 2024 19:20:04 +0100 Subject: [PATCH 3/6] feat: update amqp binding version --- amqp/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/amqp/README.md b/amqp/README.md index edcd836f..9cda8229 100644 --- a/amqp/README.md +++ b/amqp/README.md @@ -6,7 +6,7 @@ This document defines how to describe AMQP-specific information on AsyncAPI. ## Version -Current version is `0.3.0`. +Current version is `0.4.0`. @@ -65,7 +65,7 @@ channels: durable: true autoDelete: false vhost: / - bindingVersion: 0.3.0 + bindingVersion: 0.4.0 ``` ```yaml @@ -81,7 +81,7 @@ channels: exclusive: true autoDelete: false vhost: / - bindingVersion: 0.3.0 + bindingVersion: 0.4.0 ``` @@ -125,7 +125,7 @@ operations: bcc: ['external.audit'] timestamp: true ack: false - bindingVersion: 0.3.0 + bindingVersion: 0.4.0 ``` @@ -154,5 +154,5 @@ channels: amqp: contentEncoding: gzip messageType: 'user.signup' - bindingVersion: 0.3.0 + bindingVersion: 0.4.0 ``` From b859f1442d283fd4d57880d8af9eec5e738e0098 Mon Sep 17 00:00:00 2001 From: Timon Back Date: Mon, 28 Oct 2024 19:31:27 +0100 Subject: [PATCH 4/6] feat: improve amqp binding description --- amqp/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/amqp/README.md b/amqp/README.md index 9cda8229..5bc9e088 100644 --- a/amqp/README.md +++ b/amqp/README.md @@ -30,7 +30,8 @@ Field Name | Type | Description ---|:---:|--- `is` | string | Defines what type of channel is it. Can be either `queue` or `routingKey` (default). `name` | string | When `is`=`routingKey`, this defines the actual routing pattern to route the message from the exchange to the queue. -`channel.$ref` | string | When `is`=`routingKey`, this defines the target queue after routing the message (essentially the binding). +`channel` | Map[string, any] | When `is`=`routingKey`, this defines the destination amqp queue. +`channel.$ref` | string | When `is`=`routingKey`, this defines an AsyncAPI channel `$ref` pointer to the destination amqp queue. `exchange` | Map[string, any] | When `is`=`routingKey`, this object defines the exchange properties. `exchange.name` | string | The name of the exchange. It MUST NOT exceed 255 characters long. `exchange.type` | string | The type of the exchange. Can be either `topic`, `direct`, `fanout`, `default` or `headers`. From eb64eec493984c1a82e93aed69c0f2dc32740c77 Mon Sep 17 00:00:00 2001 From: Timon Back Date: Mon, 28 Oct 2024 19:45:52 +0100 Subject: [PATCH 5/6] feat: use reference object description in amqp binding --- amqp/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/amqp/README.md b/amqp/README.md index 5bc9e088..35a6c717 100644 --- a/amqp/README.md +++ b/amqp/README.md @@ -30,8 +30,7 @@ Field Name | Type | Description ---|:---:|--- `is` | string | Defines what type of channel is it. Can be either `queue` or `routingKey` (default). `name` | string | When `is`=`routingKey`, this defines the actual routing pattern to route the message from the exchange to the queue. -`channel` | Map[string, any] | When `is`=`routingKey`, this defines the destination amqp queue. -`channel.$ref` | string | When `is`=`routingKey`, this defines an AsyncAPI channel `$ref` pointer to the destination amqp queue. +`channel` | [Reference Object](https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#referenceObject) | When `is`=`routingKey`, a $ref pointer to the definition of the channel where the amqp message is routed to. If defined, this property MUST point to a Channel Object in any location. Please note the channel property value MUST be a Reference Object and, therefore, MUST NOT contain a Channel Object. `exchange` | Map[string, any] | When `is`=`routingKey`, this object defines the exchange properties. `exchange.name` | string | The name of the exchange. It MUST NOT exceed 255 characters long. `exchange.type` | string | The type of the exchange. Can be either `topic`, `direct`, `fanout`, `default` or `headers`. From 1c02850b96a1bbae9f72e795a6796d0dac513937 Mon Sep 17 00:00:00 2001 From: Timon Back Date: Mon, 28 Oct 2024 19:52:48 +0100 Subject: [PATCH 6/6] feat: use destinct exchange address --- amqp/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/amqp/README.md b/amqp/README.md index 35a6c717..7a072368 100644 --- a/amqp/README.md +++ b/amqp/README.md @@ -52,7 +52,7 @@ This object MUST contain only the properties defined above. ```yaml channels: userSignupExchange: - address: 'user.signup' + address: 'signup' bindings: amqp: is: routingKey