Skip to main content

Messages

MQTT has 14 different message types. Typically, end users only need to employ the CONNECT, PUBLISH, SUBSCRIBE, and UNSUBSCRIBE message types. The other message types are used for internal mechanisms and message flows.

MESSAGE TYPEDESCRIPTION
CONNECTClient request to connect to Server
CONNACKConnection Acknowledgement
PUBLISHA message which represents a new/separate publish
PUBACKQoS 1 Response to a PUBLISH message
PUBREC (Pub Received)First part of QoS 2 message flow
PUBREL (Pub Release)Second part of QoS 2 message flow
PUBCOMP (Pub Complete)Last part of the QoS 2 message flow
SUBSCRIBEA message used by clients to subscribe to specific topics
SUBACKAcknowledgement of a SUBSCRIBE message
UNSUBSCRIBEA message used by clients to unsubscribe from specific topics
UNSUBACKAcknowledgement of an UNSUBSCRIBE message
PINGREQHeartbeat message
PINGRESPHeartbeat message acknowledgement
DISCONNECTGraceful disconnect message sent by clients before disconnecting.