Interface NegotiatedSettings

Mqtt behavior settings that are dynamically negotiated as part of the CONNECT/CONNACK exchange.

While you can infer all of these values from a combination of

  1. defaults as specified in the mqtt5 spec
  2. your CONNECT settings
  3. the CONNACK from the broker

the client instead does the combining for you and emits a NegotiatedSettings object with final, authoritative values.

Negotiated settings are communicated with every successful connection establishment.

Hierarchy

  • NegotiatedSettings

Properties

maximumQos: QoS

The maximum QoS allowed for publishes on this connection instance

sessionExpiryInterval: number

The amount of time in seconds the server will retain the MQTT session after a disconnect.

receiveMaximumFromServer: number

The number of in-flight QoS 1 and QoS2 publications the server is willing to process concurrently.

maximumPacketSizeToServer: number

The maximum packet size the server is willing to accept.

topicAliasMaximumToServer: number

the maximum allowed topic alias value on publishes sent from client to server

topicAliasMaximumToClient: number

the maximum allowed topic alias value on publishes sent from server to client

serverKeepAlive: number

The maximum amount of time in seconds between client packets. The client should use PINGREQs to ensure this limit is not breached. The server will disconnect the client for inactivity if no MQTT packet is received in a time interval equal to 1.5 x this value.

retainAvailable: boolean

Whether the server supports retained messages.

wildcardSubscriptionsAvailable: boolean

Whether the server supports wildcard subscriptions.

subscriptionIdentifiersAvailable: boolean

Whether the server supports subscription identifiers

sharedSubscriptionsAvailable: boolean

Whether the server supports shared subscriptions

rejoinedSession: boolean

Whether the client has rejoined an existing session.

clientId: string

The final client id in use by the newly-established connection. This will be the configured client id if one was given in the configuration, otherwise, if no client id was specified, this will be the client id assigned by the server. Reconnection attempts will always use the auto-assigned client id, allowing for auto-assigned session resumption.

Generated using TypeDoc