Welcome to the MQTT Essentials Part 5. In this video, we will talk about the most important operations MQTT has to offer: publish, subscribe, and unsubscribe.
👉 Publish: An MQTT client can publish messages as soon as it connects to a broker. The MQTT client produces a MQTT publish packet and sends it to the broker. Mandatory information of a publish packet:
- topicName: simple string that is hierarchically structured with forward slashes as delimiters
- Quality of Service Level (QoS): number indicates the Quality of Service Level (QoS) of the message
- retainFlag: defines whether the message is saved by the broker as the last known good value for a specified topic
- payload: responsible for carrying all relevant information
- dupFlag: indicates that the message is a duplicate
- packetId: uniquely identifies a message
👉 Subscribe: To receive messages on topics of interest, the client sends a subscribe packet to the MQTT broker. A subscribe message can contain multiple subscriptions for a client. Each subscription is made up of a topic and a QoS level. To confirm each subscription, the broker sends a SUBACK acknowledgment message to the client.
👉 Unsubscribe: The counterpart of the subscribe packet is the unsubscribe packet. This message deletes existing subscriptions of a client on the broker.
*** Chapters / Table of Contents ***
00:00 Introduction to MQTT Publish, Subscribe, and Unsubscribe Pattern
00:26 Publish in MQTT
03:10 Subscribe in MQTT
04:08 Unsubscribe in MQTT
04:33 Summary
05:05 Announcing Part 6 - MQTT Topics & Best Practices
👉 If you missed Part 1 - What is MQTT, watch it now: [ Ссылка ]
👉 Continue watching the MQTT Essential Series now: Part 6 - MQTT Topic Best Practices: [ Ссылка ]
👉 We also explain the core of MQTT concepts, its features, and other essential information on the HiveMQ blog: [ Ссылка ]
👉 Get your own MQTT Essentials in a comprehensive, free E-Book: [ Ссылка ]
👉 To know about HiveMQ: [ Ссылка ]
Subscribe to our HiveMQ channel to get video updates. Hit the subscribe button above or subscribe to our newsletter ([ Ссылка ]) to keep up to date on the latest MQTT news.
#MQTT #MQTTEssentials #MQTTMonday #IoT #MQTTPublishSubscribe
Ещё видео!