A borker is an object representing a message broker, a server or any other kind of computer program capable of sending and/or receiving data.

Akwatype Brokers will generate servers in the AsyncAPI descriptions. We call them Broker to differentiate them from the servers used to generate OpenAPI descriptions

The property names of an Akwatype broker are the same as those of an AsyncAPI server.

  • For more information on these properties we suggest you refer to the description of a server in the AsyncAPI specification.

Example of a broker description in an Akwatype description :

broker Production {
    description"The production Asynchrone API server"
    url"{username}.scaleway.com:{port}/{basePath}"
    protocol"secure-mqtt"
    variable username {
        description"This value is assigned by the service provider, in this example scaleway.com"
        default"demo"      
    }
    variable port {
        enum: ["8883","8884"]
        default"8883"      
    }
    variable basePath {
        default"v2"
    }
}

Standard broker properties :

  • url (String)
    • A URL to the target host. This URL supports Server Variables.
  • protocol (String)
    • The protocol this URL supports for connection.
  • protocolVersion (String)
    • The version of the protocol used for connection
  • description (String)
    • An optional string describing the host designated by the URL
  • variable (String)
    • variable name and its value. The value is used for substitution in the server's URL template .
  • security (String)
    • A declaration of which security mechanisms can be used with this server. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a connection or operation.