Skip to content

Commit

Permalink
Merge branch 'master' into update_kafkaTopicConfiguration
Browse files Browse the repository at this point in the history
  • Loading branch information
gokerakc authored Feb 5, 2024
2 parents 820c410 + 7093d99 commit 9e8ae6d
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 61 deletions.
13 changes: 6 additions & 7 deletions http/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This document defines how to describe HTTP-specific information on AsyncAPI.

## Version

Current version is `0.2.0`.
Current version is `0.3.0`.


<a name="server"></a>
Expand All @@ -21,7 +21,6 @@ This object MUST NOT contain any properties. Its name is reserved for future use

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


<a name="operation"></a>

## Operation Binding Object
Expand All @@ -44,7 +43,7 @@ channels:
address: /employees
operations:
employees:
action: send:
action: send
bindings:
http:
method: GET
Expand All @@ -58,10 +57,9 @@ operations:
minimum: 1
description: The Id of the company.
additionalProperties: false
bindingVersion: '0.2.0'
bindingVersion: '0.3.0'
```
<a name="message"></a>
## Message Binding Object
Expand All @@ -73,11 +71,11 @@ This object contains information about the message representation in HTTP.
Field Name | Type | Description
---|:---:|---
<a name="messageBindingObjectHeaders"></a>`headers` | [Schema Object][schemaObject] \| [Reference Object](referenceObject) | A Schema object containing the definitions for HTTP-specific headers. This schema MUST be of type `object` and have a `properties` key.
<a name="messageBindingObjectStatusCode"></a>`statusCode` | number | The HTTP response status code according to [RFC 9110](https://httpwg.org/specs/rfc9110.html#overview.of.status.codes). `statusCode` is only relevant for messages referenced by the [Operation Reply Object](https://www.asyncapi.com/docs/reference/specification/v3.0.0#operationReplyObject), as it defines the status code for the response. In all other cases, this value can be safely ignored.
<a name="messageBindingObjectBindingVersion"></a>`bindingVersion` | string | The version of this binding. If omitted, "latest" MUST be assumed.

This object MUST contain only the properties defined above.


```yaml
channels:
test:
Expand All @@ -86,13 +84,14 @@ channels:
testMessage:
bindings:
http:
statusCode: 200
headers:
type: object
properties:
Content-Type:
type: string
enum: ['application/json']
bindingVersion: '0.2.0'
bindingVersion: '0.3.0'
```

[schemaObject]: https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#schemaObject
Expand Down
11 changes: 6 additions & 5 deletions mqtt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ Field Name | Type | MQTT Versions | Description
<a name="serverBindingObjectLastWillMessage"></a>`lastWill.message` | string | 3, 5 | Last Will message.
<a name="serverBindingObjectLastWillRetain"></a>`lastWill.retain` | boolean | 3, 5 | Whether the broker should retain the Last Will and Testament message or not.
<a name="serverBindingObjectKeepAlive"></a>`keepAlive` | integer | 3, 5 | Interval in seconds of the longest period of time the broker and the client can endure without sending a message.
<a name="serverBindingObjectSessionExpiryInterval"></a>`sessionExpiryInterval` | integer \| [Schema Object][schemaObject] \| [Reference Object](referenceObject) | 5 | Interval in seconds or a *Schema Object* containing the definition of the interval. The broker maintains a session for a disconnected client until this interval expires.
<a name="serverBindingObjectMaximumPacketSize"></a>`maximumPacketSize` | integer \| [Schema Object][schemaObject] \| [Reference Object](referenceObject) | 5 | Number of bytes or a *Schema Object* representing the maximum packet size the client is willing to accept.
<a name="serverBindingObjectSessionExpiryInterval"></a>`sessionExpiryInterval` | integer \| [Schema Object][schemaObject] \| [Reference Object][referenceObject] | 5 | Interval in seconds or a *Schema Object* containing the definition of the interval. The broker maintains a session for a disconnected client until this interval expires.
<a name="serverBindingObjectMaximumPacketSize"></a>`maximumPacketSize` | integer \| [Schema Object][schemaObject] \| [Reference Object][referenceObject] | 5 | Number of bytes or a *Schema Object* representing the maximum packet size the client is willing to accept.
<a name="serverBindingObjectBindingVersion"></a>`bindingVersion` | string | | The version of this binding. If omitted, "latest" MUST be assumed. |

This object MUST contain only the properties defined above.
Expand Down Expand Up @@ -87,7 +87,7 @@ Field Name | Type | Applies To | MQTT Versions | Description
---|:---:|:---:|:---:|---
<a name="operationBindingObjectQoS"></a>`qos` | integer | Publish, Subscribe | 3, 5 | Defines the Quality of Service (QoS) levels for the message flow between client and server. Its value MUST be either 0 (At most once delivery), 1 (At least once delivery), or 2 (Exactly once delivery).
<a name="operationBindingObjectRetain"></a>`retain` | boolean | Publish | 3, 5 | Whether the broker should retain the message or not.
<a name="operationBindingObjectMessageExpiryInterval"></a>`messageExpiryInterval` | integer \| [Schema Object][schemaObject] \| [Reference Object](referenceObject)| Publish | 5 | Interval in seconds or a *Schema Object* containing the definition of the lifetime of the message.
<a name="operationBindingObjectMessageExpiryInterval"></a>`messageExpiryInterval` | integer \| [Schema Object][schemaObject] \| [Reference Object][referenceObject]| Publish | 5 | Interval in seconds or a *Schema Object* containing the definition of the lifetime of the message.
<a name="operationBindingObjectBindingVersion"></a>`bindingVersion` | string | | | The version of this binding. If omitted, "latest" MUST be assumed.

This object MUST contain only the properties defined above.
Expand Down Expand Up @@ -138,9 +138,9 @@ This object contains information about the message representation in MQTT.
Field Name | Type | MQTT Versions | Description
---|:---:|:---:|---
<a name="messageBindingObjectPayloadFormatIndicator"></a>`payloadFormatIndicator` | integer | 5 | Either: **0** (zero): Indicates that the payload is unspecified bytes, or **1**: Indicates that the payload is UTF-8 encoded character data. |
<a name="messageBindingObjectCorrelationData"></a>`correlationData` | [Schema Object][schemaObject] \| [Reference Object](referenceObject) | 5 | Correlation Data is used by the sender of the request message to identify which request the response message is for when it is received.
<a name="messageBindingObjectCorrelationData"></a>`correlationData` | [Schema Object][schemaObject] \| [Reference Object][referenceObject] | 5 | Correlation Data is used by the sender of the request message to identify which request the response message is for when it is received.
<a name="messageBindingObjectContentType"></a>`contentType` | string | 5 | String describing the content type of the message payload. This should not conflict with the `contentType` field of the associated AsyncAPI Message object.
<a name="messageBindingObjectResponseTopic"></a>`responseTopic` | URI string \| [Schema Object][schemaObject] \| [Reference Object](referenceObject) | 5 | The topic (channel URI) for a response message.
<a name="messageBindingObjectResponseTopic"></a>`responseTopic` | URI string \| [Schema Object][schemaObject] \| [Reference Object][referenceObject] | 5 | The topic (channel URI) for a response message.
<a name="messageBindingObjectBindingVersion"></a>`bindingVersion` | string | | The version of this binding. If omitted, "latest" MUST be assumed.

This object MUST contain only the properties defined above.
Expand Down Expand Up @@ -181,3 +181,4 @@ channels:

[schemaObject]: https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#schemaObject
[referenceObject]: https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#referenceObject

137 changes: 88 additions & 49 deletions solace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ This document defines how to describe Solace-specific information with AsyncAPI.

## Version

Current version is `0.3.0`.
Current version is `0.4.0`.

<a name="server"></a>

## Server Binding Object

Field Name | Type | Description
---|---|---
`bindingVersion`|String|The current version is 0.3.0
`msgVpn`|String|The Virtual Private Network name on the Solace broker.

| Field Name | Type | Description |
|------------------|--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `bindingVersion` | String | The current version is 0.4.0 |
| `msgVpn` | String | The Virtual Private Network name on the Solace broker. |
| `clientName` | String | A unique client name to use to register to the appliance. If specified, it must be a valid Topic name, and a maximum of 160 bytes in length when encoded as UTF-8. |

<a name="channel"></a>

Expand All @@ -32,17 +32,21 @@ This object MUST NOT contain any properties. Its name is reserved for future use

We need the ability to support several bindings for each operation, see the [Example](#example) section below for details.

Field Name | Type | Description
---|---|---
`bindingVersion`|String|The current version is 0.3.0
`destinations`|List of Destination Objects|Destination Objects are described next.
| Field Name | Type | Description |
|------------------|---------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `bindingVersion` | String | The current version is 0.4.0 |
| `destinations` | List of Destination Objects | Destination Objects are described next. |
| `timeToLive` | Integer \| [Schema Object][schemaObject] \| [Reference Object][referenceObject] | Interval in milliseconds or a *Schema Object* containing the definition of the lifetime of the message. |
| `priority` | Integer \| [Schema Object][schemaObject] \| [Reference Object][referenceObject] | The valid priority value range is 0-255 with 0 as the lowest priority and 255 as the highest or a *Schema Object* containing the definition of the priority. |
| `dmqEligible` | Boolean | Set the message to be eligible to be moved to a Dead Message Queue. The default value is false. |

### Destination Object

Each destination has the following structure:

| Field Name | Type | Description |
| -------------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|----------------------------|----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `bindingVersion` | String | The current version is 0.4.0 |
| `destinationType` | Enum | 'queue' or 'topic'. If the type is queue, then the subscriber can bind to the queue, which in turn will subscribe to the topic as represented by the channel name or to the provided topicSubscriptions. |
| `deliveryMode` | Enum | 'direct' or 'persistent'. This determines the quality of service for publishing messages as documented [here.](https://docs.solace.com/Get-Started/Core-Concepts-Message-Delivery-Modes.htm) Default is 'persistent'. |
| `queue.name` | String | The name of the queue, only applicable when destinationType is 'queue'. |
Expand Down Expand Up @@ -87,39 +91,51 @@ components:
$ref: '#/components/schemas/Person'
schemaFormat: application/vnd.aai.asyncapi+json;version=2.0.0
contentType: application/json
channels:
'person/{personId}/{eventType}':
publish:
bindings:
solace:
bindingVersion: 0.3.0
destinations:
- destinationType: queue
queue:
name: CreatedHREvents
topicSubscriptions:
operations:
addPerson:
action: send
channel:
$ref: '#/channels/address'
messages:
- $ref: '#/channels/address/messages/personEvent'
bindings:
solace:
bindingVersion: 0.4.0
destinations:
- destinationType: queue
queue:
name: CreatedHREvents
topicSubscriptions:
- person/*/created
- destinationType: queue
queue:
name: UpdatedHREvents
topicSubscriptions:
- destinationType: queue
queue:
name: UpdatedHREvents
topicSubscriptions:
- person/*/updated
message:
$ref: '#/components/messages/PersonEvent'
timeToLive: 5000
priority: 120
dmqEligible: true

channels:
person:
address: person/{personId}/{eventType}
parameters:
personId:
schema:
type: string
eventType:
schema:
type: string
asyncapi: 2.4.0
messages:
personEvent:
$ref: '#/components/messages/PersonEvent'
asyncapi: 3.0.0
info:
title: HRApp
version: 0.0.1
```
The expected behaviour would be that the application binds to both queues, and each queue has its own topic subscription, one to created and one to updated events.
The expected behavior would be that the application binds to both queues, and each queue has its own topic subscription, one to create and one to updated events.
## Example with a wildcard subscription ##
Expand All @@ -130,34 +146,57 @@ This example shows how a client could receive all the topics under `person/` usi
components:
schemas:
Person:
type: string
type: string
messages:
PersonEvent:
payload:
$ref: '#/components/schemas/Person'
schemaFormat: application/vnd.aai.asyncapi+json;version=2.0.0
schemaFormat: application/vnd.aai.asyncapi+json;version=3.0.0
schema:
$ref: '#/components/schemas/Person'
contentType: application/json
channels:
'person/{personId}/{eventType}':
publish:
bindings:
solace:
bindingVersion: 0.3.0
destinations:
- destinationType: topic
operations:
addPerson:
action: send
channel:
$ref: '#/channels/person'
messages:
- $ref: '#/channels/person/messages/personEvent'
bindings:
solace:
bindingVersion: 0.4.0
destinations:
- destinationType: queue
queue:
name: CreatedHREvents
topicSubscriptions:
- person/>
message:
$ref: '#/components/messages/PersonEvent'
- person/*/created
- destinationType: queue
queue:
name: UpdatedHREvents
topicSubscriptions:
- person/*/updated
timeToLive: 5000
priority: 120
dmqEligible: true
channels:
person:
address: person/{personId}/{eventType}
parameters:
personId:
schema:
type: string
description: The machine readable id of the person
eventType:
schema:
type: string
asyncapi: 2.4.0
enum:
- create
- delete
messages:
personEvent:
$ref: '#/components/messages/PersonEvent'
asyncapi: 3.0.0
info:
title: HRApp
version: 0.0.1
```

[schemaObject]: https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#schemaObject
[referenceObject]: https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#referenceObject

0 comments on commit 9e8ae6d

Please sign in to comment.