MQTT::packet_id

Description

This command gets or sets the packet-id of an MQTT message.

Syntax

MQTT::packet_id [<packet-id>]

This command is valid only for following MQTT message types:
  • PUBLISH (if QoS > 0)
  • PUBACK
  • PUBREC
  • PUBREL
  • PUBCOMP
  • SUBSCRIBE
  • SUBACK
  • UNSUBSCRIBE
  • UNSUBACK
  • PINGREQ
  • PINGRESP
  • DISCONNECT

MQTT::packet_id

  • Returns the packet-id of the MQTT message.

MQTT::packet_id <packet-id>

  • Replaces the packet-id of the MQTT message with . The value supplied must be less than 65536.

Examples