Skip to content

MQTT server binding

Contains information about the server representation in MQTT.

Structure

copy

Examples

json
{
    "clientId": "guest",
    "cleanSession": true,
    "lastWill": {
        "topic": "/last-wills",
        "qos": 2,
        "message": "Guest gone offline.",
        "retain": false
    },
    "keepAlive": 60,
    "sessionExpiryInterval": 120,
    "maximumPacketSize": 1024,
    "bindingVersion": "0.2.0"
}

Changelog

Added

sessionExpiryInterval

Interval time 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.

json
{
    "sessionExpiryInterval": { 
        "oneOf": [ 
            { 
                "type": "integer", 
                "minimum": 0
            }, 
            { 
                "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json"
            }, 
            { 
                "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json"
            } 
        ], 
        "description": "Interval time 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."
    }
}

maximumPacketSize

Number of bytes or a Schema Object representing the Maximum Packet Size the Client is willing to accept.

json
{
    "maximumPacketSize": { 
        "oneOf": [ 
            { 
                "type": "integer", 
                "minimum": 1, 
                "maximum": 4294967295
            }, 
            { 
                "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json"
            }, 
            { 
                "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json"
            } 
        ], 
        "description": "Number of bytes or a Schema Object representing the Maximum Packet Size the Client is willing to accept."
    } 
}