Skip to content
Permalink
Browse files

Add specs and index

  • Loading branch information...
fmvilas committed Aug 24, 2019
1 parent 118713c commit b817a715ce93e811f16d1d7d98ef224d787fbe0f
Showing with 789 additions and 3 deletions.
  1. +1 −1 LICENSE
  2. +18 −2 README.md
  3. +140 −0 amqp/README.md
  4. +37 −0 amqp1/README.md
  5. +100 −0 http/README.md
  6. +40 −0 jms/README.md
  7. +89 −0 kafka/README.md
  8. +112 −0 mqtt/README.md
  9. +40 −0 nats/README.md
  10. +40 −0 redis/README.md
  11. +40 −0 sns/README.md
  12. +40 −0 sqs/README.md
  13. +40 −0 stomp/README.md
  14. +52 −0 websockets/README.md
@@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copyright 2019 Francisco Méndez Vilas

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -1,2 +1,18 @@
# bindings
AsyncAPI bindings specifications
# AsyncAPI bindings specifications

This repository contains the specifications for each AsyncAPI protocol binding.

## Index

* [AMQP binding](./amqp)
* [AMQP 1.0 binding](./amqp1)
* [HTTP binding](./http)
* [JMS binding](./jms)
* [Kafka binding](./kafka)
* [MQTT binding](./mqtt)
* [NATS binding](./nats)
* [Redis binding](./redis)
* [SNS binding](./sns)
* [SQS binding](./sqs)
* [STOMP binding](./stomp)
* [WebSockets binding](./websockets)
@@ -0,0 +1,140 @@
# AMQP 0-9-1 Bindings

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

<a name="version"></a>

## Version

Current version is `0.1.0`.


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

## Server Binding Object

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




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

## Channel Binding Object

This object contains information about the channel representation in AMQP.

##### Fixed Fields

Field Name | Type | Description
---|:---:|---
<a name="channelBindingObjectIs"></a>`is` | string | Defines what type of channel is it. Can be either `queue` or `routingKey` (default).
<a name="channelBindingObjectExchange"></a>`exchange` | Map[string, any] | When `is`=`routingKey`, this object defines the exchange properties.
<a name="channelBindingObjectExchangeName"></a>`exchange.name` | string | The name of the exchange. It MUST NOT exceed 255 characters long.
<a name="channelBindingObjectExchangeType"></a>`exchange.type` | string | The type of the exchange. Can be either `topic`, `direct`, `fanout`, `default` or `headers`.
<a name="channelBindingObjectExchangeDurable"></a>`exchange.durable` | boolean | Whether the exchange should survive broker restarts or not.
<a name="channelBindingObjectExchangeAutoDelete"></a>`exchange.autoDelete` | boolean | Whether the exchange should be deleted when the last queue is unbound from it.
<a name="channelBindingObjectQueue"></a>`queue` | Map[string, any] | When `is`=`queue`, this object defines the queue properties.
<a name="channelBindingObjectQueueName"></a>`queue.name` | string | The name of the queue. It MUST NOT exceed 255 characters long.
<a name="channelBindingObjectQueueDurable"></a>`queue.durable` | boolean | Whether the queue should survive broker restarts or not.
<a name="channelBindingObjectQueueExclusive"></a>`queue.exclusive` | boolean | Whether the queue should be used only by one connection or not.
<a name="channelBindingObjectAutoDelete"></a>`queue.autoDelete` | boolean | Whether the queue should be deleted when the last consumer unsubscribes.
<a name="channelBindingObjectBindingVersion"></a>`bindingVersion` | string | The version of this binding. If omitted, "latest" MUST be assumed.

This object MUST contain only the properties defined above.

##### Example

```yaml
channels:
user/signedup:
bindings:
amqp:
is: routingKey
queue:
name: my-queue-name
durable: true
exclusive: true
autoDelete: false
exchange:
name: myExchange
type: topic
durable: true
autoDelete: false
bindingVersion: 0.1.0
```


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

## Operation Binding Object

This object contains information about the operation representation in AMQP.

##### Fixed Fields

Field Name | Type | Applies To | Description
---|:---:|:---:|---
<a name="operationBindingObjectExpiration"></a>`expiration` | integer | Publish, Subscribe | TTL (Time-To-Live) for the message. It MUST be greater than or equal to zero.
<a name="operationBindingObjectUserId"></a>`userId` | string | Publish, Subscribe | Identifies the user who has sent the message.
<a name="operationBindingObjectCC"></a>`cc` | [string] | Publish, Subscribe | The routing keys the message should be routed to at the time of publishing.
<a name="operationBindingObjectPriority"></a>`priority` | integer | Publish, Subscribe | A priority for the message.
<a name="operationBindingObjectDeliveryMode"></a>`deliveryMode` | integer | Publish, Subscribe | Delivery mode of the message. Its value MUST be either 1 (transient) or 2 (persistent).
<a name="operationBindingObjectMandatory"></a>`mandatory` | boolean | Publish | Whether the message is mandatory or not.
<a name="operationBindingObjectBCC"></a>`bcc` | [string] | Publish | Like [cc](#operationBindingObjectCC) but consumers will not receive this information.
<a name="operationBindingObjectReplyTo"></a>`replyTo` | string | Publish, Subscribe | Name of the queue where the consumer should send the response.
<a name="operationBindingObjectTimestamp"></a>`timestamp` | boolean | Publish, Subscribe | Whether the message should include a timestamp or not.
<a name="operationBindingObjectAck"></a>`ack` | boolean | Subscribe | Whether the consumer should ack the message or not.
<a name="operationBindingObjectBindingVersion"></a>`bindingVersion` | string | Publish, Subscribe | The version of this binding. If omitted, "latest" MUST be assumed.

This object MUST contain only the properties defined above.

##### Example

```yaml
channels:
user/signup:
publish:
bindings:
amqp:
expiration: 100000
userId: guest
cc: ['user.logs']
priority: 10
deliveryMode: 2
mandatory: false
bcc: ['external.audit']
replyTo: user.signedup
timestamp: true
ack: false
bindingVersion: 0.1.0
```


<a name="message"></a>

## Message Binding Object

This object contains information about the message representation in AMQP.

##### Fixed Fields

Field Name | Type | Description
---|:---:|---
<a name="messageBindingObjectContentEncoding"></a>`contentEncoding` | string | A MIME encoding for the message content.
<a name="messageBindingObjectMessageType"></a>`messageType` | string | Application-specific message type.
<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:
user/signup:
publish:
message:
bindings:
amqp:
contentEncoding: gzip
messageType: 'user.signup'
bindingVersion: 0.1.0
```
@@ -0,0 +1,37 @@
# AMQP 1.0 Bindings

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

<a name="version"></a>

## Version

Current version is `0.1.0`.


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

## Server Binding Object

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




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

## Channel Binding Object

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

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

## Operation Binding Object

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

<a name="message"></a>

## Message Binding Object

This object MUST NOT contain any properties. Its name is reserved for future use.
@@ -0,0 +1,100 @@
# HTTP Bindings

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

<a name="version"></a>

## Version

Current version is `0.1.0`.


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

## Server Binding Object

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




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

## Channel Binding Object

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


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

## Operation Binding Object

##### Fixed Fields

Field Name | Type | Description
---|:---:|---
<a name="operationBindingObjectType"></a>`type` | string | **Required**. Type of operation. Its value MUST be either `request` or `response`.
<a name="operationBindingObjectMethod"></a>`method` | string | When `type` is `request`, this is the HTTP method, otherwise it MUST be ignored. Its value MUST be one of `GET`, `POST`, `PUT`, `PATCH`, `DELETE`, `HEAD`, `OPTIONS`, `CONNECT`, and `TRACE`.
<a name="operationBindingObjectQuery"></a>`query` | [Schema Object][schemaObject] | A Schema object containing the definitions for each query parameter. This schema MUST be of type `object` and have a `properties` key.
<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.

##### Example

```yaml
channels:
/employees:
subscribe:
bindings:
http:
type: request
method: GET
query:
type: object
required:
- companyId
properties:
companyId:
type: number
minimum: 1
description: The Id of the company.
additionalProperties: false
bindingVersion: '0.1.0'
```


<a name="message"></a>

## Message Binding Object

This object contains information about the message representation in HTTP.

##### Fixed Fields

Field Name | Type | Description
---|:---:|---
<a name="messageBindingObjectHeaders"></a>`headers` | [Schema Object][schemaObject] | A Schema object containing the definitions for HTTP-specific headers. This schema MUST be of type `object` and have a `properties` key.
<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:
publish:
message:
bindings:
http:
headers:
type: object
properties:
Content-Type:
type: string
enum: ['application/json']
meta:
version: '0.1.0'
```

[schemaObject]: https://www.asyncapi.com/docs/specifications/2.0.0/#schemaObject
@@ -0,0 +1,40 @@
# JMS Bindings

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

<a name="version"></a>

## Version

Current version is `0.1.0`.


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

## Server Binding Object

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



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

## Channel Binding Object

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



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

## Operation Binding Object

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



<a name="message"></a>

## Message Binding Object

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

0 comments on commit b817a71

Please sign in to comment.
You can’t perform that action at this time.