Interface ConnackPacket

Data model of an MQTT5 CONNACK packet.

Hierarchy

Properties

assignedClientIdentifier?: string

Specifies a client identifier assigned to this connection by the server. Only valid when the client id of the preceding CONNECT packet was left empty.

See MQTT5 Assigned Client Identifier

maximumPacketSize?: number

Specifies the maximum packet size, in bytes, that the server is willing to accept. If undefined, there is no limit beyond what is imposed by the MQTT spec itself.

See MQTT5 Maximum Packet Size

maximumQos?: QoS

The maximum message delivery quality of service that the server will allow on this connection.

See MQTT5 Maximum QoS

reasonCode: ConnectReasonCode

Indicates either success or the reason for failure for the connection attempt.

See MQTT5 Connect Reason Code

reasonString?: string

Additional diagnostic information about the result of the connection attempt.

See MQTT5 Reason String

receiveMaximum?: number

The maximum amount of in-flight QoS 1 or 2 messages that the server is willing to handle at once. If omitted, the limit is based on the valid MQTT packet id space (65535).

See MQTT5 Receive Maximum

responseInformation?: string

A value that can be used in the creation of a response topic associated with this connection. MQTT5-based request/response is outside the purview of the MQTT5 spec and this client.

See MQTT5 Response Information

retainAvailable?: boolean

Indicates whether the server supports retained messages. If undefined, retained messages are supported.

See MQTT5 Retain Available

serverKeepAlive?: number

Server-requested override of the keep alive interval, in seconds. If undefined, the keep alive value sent by the client should be used.

See MQTT5 Server Keep Alive

serverReference?: string

Property indicating an alternate server that the client may temporarily or permanently attempt to connect to instead of the configured endpoint. Will only be set if the reason code indicates another server may be used (ServerMoved, UseAnotherServer).

See MQTT5 Server Reference

sessionExpiryInterval?: number

A time interval, in seconds, that the server will persist this connection's MQTT session state for. If present, this value overrides any session expiry specified in the preceding CONNECT packet.

See MQTT5 Session Expiry Interval

sessionPresent: boolean

True if the client rejoined an existing session on the server, false otherwise.

See MQTT5 Session Present

sharedSubscriptionsAvailable?: boolean

Indicates whether the server supports shared subscription topic filters. If undefined, shared subscriptions are supported.

See MQTT5 Shared Subscriptions Available

subscriptionIdentifiersAvailable?: boolean

Indicates whether the server supports subscription identifiers. If undefined, subscription identifiers are supported.

See MQTT5 Subscription Identifiers Available

topicAliasMaximum?: number

Specifies the maximum topic alias value that the server will accept from the client.

See MQTT5 Topic Alias Maximum

type?: PacketType

Always 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).

userProperties?: UserProperty[]

Set of MQTT5 user properties included with the packet.

See MQTT5 User Property

wildcardSubscriptionsAvailable?: boolean

Indicates whether the server supports wildcard subscriptions. If undefined, wildcard subscriptions are supported.

See MQTT5 Wildcard Subscriptions Available

Generated using TypeDoc