Interface PublishPacket

Data model of an MQTT5 PUBLISH packet

Hierarchy

Properties

contentType?: string

Property specifying the content type of the payload. Not internally meaningful to MQTT5.

See MQTT5 Content Type

correlationData?: BinaryData

Opaque binary data used to correlate between publish messages, as a potential method for request-response implementation. Not internally meaningful to MQTT5.

See MQTT5 Correlation Data

messageExpiryIntervalSeconds?: number

Sent publishes - indicates the maximum amount of time allowed to elapse for message delivery before the server should instead delete the message (relative to a recipient).

Received publishes - indicates the remaining amount of time (from the server's perspective) before the message would have been deleted relative to the subscribing client.

If left undefined, indicates no expiration timeout.

See MQTT5 Message Expiry Interval

payload?: Payload

The payload of the publish message.

See MQTT5 Publish Payload

payloadFormat?: PayloadFormatIndicator

Property specifying the format of the payload data. The mqtt5 client does not enforce or use this value in a meaningful way.

See MQTT5 Payload Format Indicator

qos: QoS

Sent publishes - The MQTT quality of service level this message should be delivered with.

Received publishes - The MQTT quality of service level this message was delivered at.

See MQTT5 QoS

responseTopic?: string

Opaque topic string intended to assist with request/response implementations. Not internally meaningful to MQTT5 or this client.

See MQTT5 Response Topic

retain?: boolean

True if this is a retained message, false otherwise.

Always set on received publishes; on sent publishes, undefined implies false.

See MQTT5 Retain

subscriptionIdentifiers?: number[]

Sent publishes - ignored

Received publishes - the subscription identifiers of all the subscriptions this message matched.

See MQTT5 Subscription Identifier

topicAlias?: number

Sent publishes - (Node only) topic alias to use, if possible, when encoding this packet. Only used if the client's outbound topic aliasing mode is set to Manual.

Received publishes - topic alias used by the server when transmitting the publish to the client.

See MQTT5 Topic Alias

topicName: string

Sent publishes - The topic this message should be published to.

Received publishes - The topic this message was published to.

See MQTT5 Topic Name

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

Generated using TypeDoc