A PUBREC message is the response to a PUBLISH message with QoS level 2. It is the second message of the QoS level 2 protocol flow. A PUBREC message is sent by the broker in response to a PUBLISH message from a publishing client, or by a subscriber in response to a PUBLISH message from the broker.
The table below shows the fixed header format.
bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
---|---|---|---|---|---|---|---|---|
byte 1 | Message Type (5) | DUP flag | QoS level | RETAIN | ||||
0 | 1 | 0 | 1 | x | x | x | x | |
byte 2 | Remaining Length (2) | |||||||
0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
The variable header contains the Message ID for the acknowledged PUBLISH. 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 |
When it receives a PUBREC message, the recipient sends a PUBREL message to the sender with the same Message ID as the PUBREC message.
Related concepts
WebSphere MQ Telemetry Transport
Related reference
WebSphere MQ Telemetry Transport fixed header
WebSphere MQ Telemetry Transport variable header
PUBLISH Publish message
Notices |
Trademarks |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
ac10980_ |