The maximum time interval, in seconds, that is permitted to elapse between the point at which the client finishes transmitting one MQTT packet and the point it starts sending the next. The client will use PINGREQ packets to maintain this property.
If the responding CONNACK contains a keep alive property value, then that is the negotiated keep alive value. Otherwise, the keep alive sent by the client is the negotiated value.
See MQTT5 Keep Alive
Optional
clientA unique string identifying the client to the server. Used to restore session state between connections.
If left empty, the broker will auto-assign a unique client id. When reconnecting, the mqtt5 client will always use the auto-assigned client id.
Optional
usernameA string value that the server may use for client authentication and authorization.
See MQTT5 User Name
Optional
passwordOpaque binary data that the server may use for client authentication and authorization.
See MQTT5 Password
Optional
sessionA time interval, in seconds, that the client requests the server to persist this connection's MQTT session state for. Has no meaning if the client has not been configured to rejoin sessions. Must be non-zero in order to successfully rejoin a session.
If the responding CONNACK contains a session expiry property value, then that is the negotiated session expiry value. Otherwise, the session expiry sent by the client is the negotiated value.
Optional
requestIf set to true, requests that the server send response information in the subsequent CONNACK. This response information may be used to set up request-response implementations over MQTT, but doing so is outside the scope of the MQTT5 spec and client.
Optional
requestIf set to true, requests that the server send additional diagnostic information (via response string or user properties) in DISCONNECT or CONNACK packets from the server.
Optional
receiveNotifies the server of the maximum number of in-flight Qos 1 and 2 messages the client is willing to handle. If omitted, then no limit is requested.
Optional
maximumNotifies the server of the maximum packet size the client is willing to handle. If omitted, then no limit beyond the natural limits of MQTT packet size is requested.
Optional
willA time interval, in seconds, that the server should wait (for a session reconnection) before sending the will message associated with the connection's session. If omitted, the server will send the will when the associated session is destroyed. If the session is destroyed before a will delay interval has elapsed, then the will must be sent at the time of session destruction.
Optional
willThe definition of a message to be published when the connection's session is destroyed by the server or when the will delay interval has elapsed, whichever comes first. If undefined, then nothing will be sent.
See MQTT5 Will
Optional
userSet of MQTT5 user properties included with the packet.
Optional
typeAlways set on packets coming from the client to the user. Ignored if set on packets that come from the user to the client.
The primary use is to allow users to distinguish between packets in polymorphic situations (for example, the result of a publish attempt which might be a Puback (QoS 1) or Pubcomp (QoS 2, when we support it).
Generated using TypeDoc
Data model of an MQTT5 CONNECT packet.