A "binding" (or "protocol binding") is a mechanism to define protocol-specific information. Therefore, a protocol binding MUST define protocol-specific information only. (from AsyncAPI definition)

The binding properties are protocol dependent.

Moreover, depending on the protocol, some properties can be defined at the level of operations (send, receive), server (broker), channels or messages.

Akwatype allows to describe the binding of the following protocols

  • kafka
  • mqtt
  • amqp
  • websockets
  • http

The binding completion in Akwatype is based on the description below (these descriptions come from the AsyncAPI specification).

  • For more information on bindings we recommend that you consult the AsyncAPI specification

OPERATION

  • kafka
    • groupId: String - Id of the consumer group
    • clientId: String - Id of the consumer inside a consumer group
    • bindingVersion: String - The version of this binding. If omitted, "latest" MUST be assumed
  • mqtt
    • qos: Integer - 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).
    • retain: Boolean - Whether the broker should retain the Last Will and Testament message or not
    • bindingVersion: String - The version of this binding. If omitted, "latest" MUST be assumed
  • amqp
    • expiration: Integer - TTL (Time-To-Live) for the message. It MUST be greater than or equal to zero
    • userId: String - Identifies the user who has sent the message
    • cc: String - The routing keys the message should be routed to at the time of publishing
    • priority: Integer - A priority for the message
    • deliveryMode: Integer - Delivery mode of the message. Its value MUST be either 1 (transient) or 2 (persistent)
    • mandatory: Boolean - Whether the message is mandatory or not
    • bcc: String - Like cc but consumers will not receive this information
    • replyTo: String - Name of the queue where the consumer should send the response
    • timestamp: Boolean - Whether the message should include a timestamp or not
    • ack: Boolean - Whether the consumer should ack the message or not
    • bindingVersion: String - The version of this binding. If omitted, "latest" MUST be assumed
  • http
    • type: String - Type of operation. Its value MUST be either request or response
    • 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.
    • query: Facade - A facade containing the definitions for each query parameter
    • bindingVersion: String - The version of this binding. If omitted, "latest" MUST be assumed

MESSAGE

  • kafka
    • key: String - The message key
    • bindingVersion: String - The version of this binding. If omitted, "latest" MUST be assumed
  • mqtt
    • bindingVersion: String - The version of this binding. If omitted, "latest" MUST be assumed
  • amqp
    • contentEncoding: String - A MIME encoding for the message content
    • messageType: String - Application-specific message type
    • bindingVersion: String - The version of this binding. If omitted, "latest" MUST be assumed
  • http
    • headers: Facade - A facade containing the definitions for HTTP-specific headers
    • bindingVersion: String - The version of this binding. If omitted, "latest" MUST be assumed

BROKER

  • mqtt
    • clientId: String - The client identifier
    • cleanSession: Boolean - Whether to create a persisten connection or not. When false, the connection will be persistent
    • lastWill - Last Will and Testament configuration
      • topic: String - The topic where the Last Will and Testament message will be sent
      • qos: Integer - Defines how hard the broker/client will try to ensure that the Last Will and Testament message is received. Its value MUST be either 0, 1 or 2
      • message: String - Last Will message
      • retain: Boolean - Whether the broker should retain the Last Will and Testament message or not
    • keepAlive: Integer - Interval in seconds of the longest period of time the broker and the client can endure without sending a message
    • bindingVersion: String - The version of this binding. If omitted, "latest" MUST be assumed

CHANNEL

  • amqp
    • is: String - Defines what type of channel is it. Can be either queue or routingKey (default)
    • exchange - Last Will and Testament configuration
      • name: String - The name of the exchange. It MUST NOT exceed 255 characters long
      • type: String - The type of the exchange. Can be either topic, direct, fanout, default or headers
      • durable: Boolean - Whether the exchange should survive broker restarts or not
      • autoDelete: Boolean - Whether the exchange should be deleted when the last queue is unbound from it
      • vhost: String - The virtual host of the exchange. Defaults to /.
    • queue - this object defines the queue properties
      • name: String - The name of the exchange. It MUST NOT exceed 255 characters long
      • durable: Boolean - Whether the exchange should survive broker restarts or not
      • exclusive: Boolean - Whether the queue should be used only by one connection or not
      • autoDelete: Boolean - Whether the queue should be deleted when the last consumer unsubscribes
      • vhost: String - The virtual host of the exchange. Defaults to /.
    • bindingVersion: String - The version of this binding. If omitted, "latest" MUST be assumed
  • websockets
    • method: String - The HTTP method to use when establishing the connection. Its value MUST be either GET or POST
    • query: Facade - A facade containing the definitions for each query parameter
    • headers: Facade - A facade containing the definitions of the HTTP headers to use when establishing the connection
    • bindingVersion: String - The version of this binding. If omitted, "latest" MUST be assumed