MQTT 5: Request Response Pattern | MQTT 5 Essentials part 8

preview_player
Показать описание
What is the Request Response Pattern?
The request response pattern in MQTT is different from the synchronous pattern in protocols like HTTP. In MQTT is works as asynchronous end-to-end acknowledgment. It ensures messages have been received by sending an acknowledge message back to the sender (so-called “business ACK”)

New Request Response Features in MQTT 5
1. Response Topic: defines the topic for the acknowledgment
2. Correlation Data: defines the correlation of published messages and responses
2. Response Information: allows the broker to send an optional UTF-8 string with information about the response topics that are expected to be used

Best Practices
- If possible make use of the Response Information field
- Use unique identifiers in the Response Topic
- Make sure that intended responders and requesters have the necessary permissions to publish and subscribe to the response topics

*** Chapters / Table of Contents ***
00:00 Introduction
00:17 The Request Response pattern in MQTT
01:12 New Request Response features in MQTT 5
02:43 Use case: door opening for a Smart Home using MQTT5
03:31 Best practices and gotchas of MQTT5
04:50 Conclusion and announcement of part 9: Topic Alias in MQTT5



👉 We're looking forward to seeing you for MQTT 5 Essentials Part 9: Topic Alias

#MQTT #MQTT5 #MQTTEssentials
Рекомендации по теме
Комментарии
Автор

I'm very modestly experience w/ MQTT & REQ+RESP seems odd to me. It makes more sense in a point-to-point communication that a bus protocol. The entire issue of how to design MQTT topic-space seems very under-addressed.

stevealexander
Автор

This seems anyway achievable with MQTT < v5 as client need to anyway subscribe for the response topic. One thing here is the flexibility to specify the response topic rather having it agreed upon client and server just like command request/response pattern.

saumilkapadia