# Could you slightly elaborate how the request response model works ? MQTT vs in rest API?

**URL:** <https://community.hivemq.com/t/could-you-slightly-elaborate-how-the-request-response-model-works-mqtt-vs-in-rest-api/102>\
**Category:** Uncategorized\
**Created:** [October 30, 2019, 5:10pm UTC](https://community.hivemq.com/t/could-you-slightly-elaborate-how-the-request-response-model-works-mqtt-vs-in-rest-api/102 "2019-10-30T17:10:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hivemq-support](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.hivemq.com/hivemq-support/32/357_2.png) [@hivemq-support](https://community.hivemq.com/u/hivemq-support)\
**Post date:** [October 30, 2019, 5:10pm UTC](https://community.hivemq.com/t/could-you-slightly-elaborate-how-the-request-response-model-works-mqtt-vs-in-rest-api/102/1 "2019-10-30T17:10:40Z")

</div>

Asked by Omkar Joglekar during our MQTT 5 webinar.  
Answer: An HTTP Request is a blocking call from a client to a server.  
The MQTT Request-Response pattern is asynchronous between two clients that are connected to the same server.  
Please feel free to add more specific questions about this topic to this thread.

---

<div class="post-metadata">

**Author:** ![technodict](https://avatars.discourse-cdn.com/v4/letter/t/c4cdca/32.png) [@technodict](https://community.hivemq.com/u/technodict)\
**Post date:** [October 31, 2019, 5:10pm UTC](https://community.hivemq.com/t/could-you-slightly-elaborate-how-the-request-response-model-works-mqtt-vs-in-rest-api/102/2 "2019-10-31T17:10:19Z")

</div>

So what happens when i receive multiple messages on a subscribed topic and the processing involves a blocking call ? Do i need some sort of list to store the messages ?

---

<div class="post-metadata">

**Author:** ![hivemq-support](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.hivemq.com/hivemq-support/32/357_2.png) [@hivemq-support](https://community.hivemq.com/u/hivemq-support)\
**Post date:** [November 1, 2019, 2:20pm UTC](https://community.hivemq.com/t/could-you-slightly-elaborate-how-the-request-response-model-works-mqtt-vs-in-rest-api/102/3 "2019-11-01T14:20:13Z")

</div>

The request/response pattern in MQTT 5 has been introduced to ensure a standardised way of allowing and additional end-to-end “business acknowledgement” between sender and receiver.  
The flow goes like this:  
Publisher sends message to Broker (with information about the response topic for the subscriber)  
Broker sends message to Subscriber  
Subscriber sends a new message on the defined topic by the Publisher to the Broker, to let the Publisher know it received the message.  
Broker sends this message to the Publisher.

This is completely different from an HTTP GET request, where the server provides a response with specific information based on the request.

I hope this makes it more clear.

Regards,  
Florian

---

<div class="post-metadata">

**Author:** ![hivemq-support](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.hivemq.com/hivemq-support/32/357_2.png) [@hivemq-support](https://community.hivemq.com/u/hivemq-support)\
**Post date:** [November 21, 2019, 9:43am UTC](https://community.hivemq.com/t/could-you-slightly-elaborate-how-the-request-response-model-works-mqtt-vs-in-rest-api/102/4 "2019-11-21T09:43:29Z")

</div>

@technodict  
I wrote up a blog post on this subject: [https://www.hivemq.com/blog/mqtt5-essentials-part9-request-response-pattern/](https://www.hivemq.com/blog/mqtt5-essentials-part9-request-response-pattern/)  
I hope it helps to clarify the difference.

Regards,  
Florian
