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

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.

maximumPacketSizeToServer: number

The maximum packet size the server is willing to accept.

maximumQos: QoS

The maximum QoS allowed for publishes on this connection instance

receiveMaximumFromServer: number

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

rejoinedSession: boolean

Whether the client has rejoined an existing session.

retainAvailable: boolean

Whether the server supports retained messages.

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.

sessionExpiryInterval: number

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

sharedSubscriptionsAvailable: boolean

Whether the server supports shared subscriptions

subscriptionIdentifiersAvailable: boolean

Whether the server supports subscription identifiers

topicAliasMaximumToClient: number

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

topicAliasMaximumToServer: number

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

wildcardSubscriptionsAvailable: boolean

Whether the server supports wildcard subscriptions.

Generated using TypeDoc