Connection acknowledgement

The newly introduced ConnAck Return Codes allow a message broker to indicate to the client which MQTT functions it supports. This information is transmitted from the message broker to the client during the ConnAck process. The following figure illustrates this process in simplified form.

Connection acknowledgement 1:

The following figure shows the connection establishment between client and message broker on TCP level:

Connection acknowledgement 2:

The following information can be transmitted from the message broker to the client during Connection Acknowledgement.

Property

Description

Retain available

Specifies whether the message broker supports retain messages.

Server KeepAlive

Specifies the KeepAlive time assigned by the server.

Shared subscriptions available

Specifies whether the message broker supports shared subscriptions.

Wildcard subscriptions available

Specifies whether the message broker supports wildcard subscriptions, e.g. subscriptions to a # or + topic.

Authentication data

Contains the authentication data, depending on the authentication method used.

Maximum packet size

Specifies the maximum packet size of the control packet. If this value is not specified, then no maximum size is explicitly set.

Maximum QoS

Specifies the maximum QoS level that the message broker supports. For example, some message broker implementations do not support QoS 2.

Reason code

Optional reason code that the message broker can transmit to the client as part of the ConnAck procedure. In conjunction with the Server Reference (see below), the message broker can use this to inform the client, for example, that it is temporarily or permanently unavailable and/or can be reached at a new address.

Maximum receive

The server uses this property to limit the number of QoS1 and QoS2 publishes it is willing to process for the client simultaneously.

Session expiry interval

The server can use this to inform the client that it is using a different Session Expiry Interval than originally requested by the client.

Response info

Optional return information from the message broker to the client. A use case for this can be, for example, that the broker informs the client about a "topic area" which has been assigned to the client and which it can access.

Maximum topic alias

Specifies the maximum value that can be used for a topic alias.

Assigned client ID

Returns the ClientID assigned by the message broker if the client has not specified its own ClientID.

Server reference

Optional (address) reference to another message broker, e.g. for Reason Code 0x9C or 0x9D (Server unavailable, Server has moved).

User Properties

User Properties are key/value pairs that can be attached to the PublishProperties. The meaning of the UserProperties is not part of the MQTT5 specification and therefore application specific.