PUBACK Publish acknowledgment

A PUBACK message is the response to a PUBLISH message with QoS level 1. A PUBACK message is sent by a broker in response to a PUBLISH message from a publishing client, and by a subscriber in response to a PUBLISH message from the broker.

Fixed header

The table below shows the format of the fixed header.

bit 7 6 5 4 3 2 1 0
byte 1 Message Type (4) DUP flag QoS level RETAIN
  0 1 0 0 x x x x
byte 2 Remaining Length (2)
  0 0 0 0 0 0 1 0
QoS level
Not used.
DUP flag
Not used.
RETAIN flag
Not used.
Remaining Length field
This is the length of the variable header (2 bytes). It can be a multibyte field.

Variable header

Contains the Message Identifier (Message ID) for the PUBLISH message that is being acknowledged. The table below shows the format of the variable header.

bit 7 6 5 4 3 2 1 0
byte 1 Message ID MSB
byte 2 Message ID LSB

Payload

There is no payload.

Actions

When the client receives the PUBACK message, it discards the original message, because it is also received (and logged) by the broker.