# E-MQTT: End-to-End Synchronous and Asynchronous Communication Mechanisms in MQTT Protocol
## 1 Introduction  
Message Queuing Telemetry Transport (MQTT) [1] is a message transmission protocol based on the ISO standard (ISO/IEC PRF 20922) communication model. MQTT operates over the TCP/IP protocol and employs a reliable and asynchronous publish-subscribe communication model. Within this model, after the publisher publishes a message, it does not care which subscriber will receive the message. Instead, the publisher promptly proceeds with subsequent tasks without waiting for feedback from the broker. The versatility of MQTT is evident through its extensive range of applications, which encompass various domains [2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13], including (but not limited to) the Internet of Things (IoT), home and industrial automation, telemetry and remote environment monitoring, energy management, smart agriculture, healthcare, transportation, and social networking systems. As described in Section 2, previous research efforts have explored various aspects of MQTT, including research to enhance MQTT functionalities [2; 4; 14; 15; 16; 17; 18; 19; 20; 21; 22], comparative analyses with other protocols [23; 24; 25; 26; 27; 28; 29; 30], support for synchronous communication [31; 32; 33; 34; 35; 36; 37; 38; 39; 40], and the facilitation of end-to-end services for security or quality of service (QoS) [41; 42; 43; 44; 45; 46; 47; 48; 49; 50]. As the MQTT environments have been growing and becoming more complicated, managing an ever-expanding array of client devices (comprising publishers and subscribers) presents considerable challenges. Therefore, there arises a need for a control device to intermittently assess the status or functionalities of these devices communicating with MQTT. For example, in a healthcare system, a medical professional with a control device might seek to ascertain whether the attached sensing devices on patients can successfully capture specific health information before he/she conducts a monitoring task. In this case, he/she (a publisher) can publish a query message with a request topic and check the statusof devices by receiving response messages published with another feedback topic by the devices. This real-world scenario reflects the fact that the publish-subscribe model needs a new communication requirement. That is, publishers need to issue query messages and confirm the moment when subscribers have received these query messages. In other words, the publish-subscribe model could need to be combined with request-response patterns [51] in future communication environments, especially when a publisher wants to check the status of subscribers. In the existing publish-subscribe models like MQTT, the publisher's awareness is limited to when the broker acknowledges a published message with QoS levels 1 and 2 [52]. As MQTT uses TCP/IP as the underlying transport-layer protocol, a message is guaranteed to be delivered reliably to recipients. However, if the publisher seeks to check the moment when a message is delivered to subscribers, it requires an intricate procedure. Upon reception of a query message from the publisher, the subscriber that holds a subscription for the concerned topic should publish a response message on a new topic to signify reception of the query message. Before that, the publisher should subscribe to this new topic to receive the response message from subscribers. We refer to this specific challenge as the \"end-to-end communication problem\" within the context of MQTT. Section 3.1 provides an in-depth examination of this problem. Although there have been many previous research efforts regarding MQTT, it is worth noting that none of these prior research endeavors have directly addressed the end-to-end communication problem. In this paper, we propose a new end-to-end MQTT (E-MQTT) that supports end-to-end communication between the publisher and the subscriber of the MQTT by adding the request-response pattern to the publish-subscribe model.