MQTT Protocol Question & Answers December 3, 2025 By WatElectronics This article lists 100 MQTT protocol MCQs for Engineering Students. All the MQTT protocol questions and answers given below include a solution and, wherever possible, a link to the relevant topic. Message Queuing Telemetry Transport (MQTT) has become one of the most widely adopted communication protocols in the Internet of Things (IoT) ecosystem. Designed for lightweight, low-power, and unreliable network environments, MQTT enables efficient machine-to-machine (M2M) communication using a simple publish–subscribe architecture. Its ability to operate with minimal bandwidth, low overhead, and flexible Quality of Service (QoS) levels makes it ideal for sensors, embedded devices, smart home systems, industrial automation, and cloud-based IoT platforms. This collection of 100 MQTT multiple-choice questions has been crafted to help learners, developers, and engineers strengthen their knowledge of MQTT fundamentals and advanced concepts. The questions span topics such as MQTT architecture, brokers, QoS mechanisms, retained messages, session handling, LWT, wildcards, security, MQTT 5.0 features, and real-world IoT implementation scenarios. Each MCQ is accompanied by a concise explanation to ensure conceptual clarity and to support both academic preparation and practical learning. 1). MQTT stands for? Message Queueing and Transmission Message Queuing Telemetry Transport Multicast Query Transport Technology Messaging Query Transfer Type None Hint 2). MQTT works on which communication model? Peer-to-Peer Request–Response Publish–Subscribe Point-to-Point None Hint 3). Which port does MQTT commonly use without TLS? 21 80 1883 5672 None Hint 4). Which MQTT QoS guarantees message delivery at least once? QoS 0 QoS 1 QoS 2 QoS 3 None Hint 5). MQTT messages are transferred through a? Direct TCP channel between devices Central Broker UDP multicast group Local router None Hint 6). Which MQTT level ensures "exactly once" delivery? QoS 0 QoS 1 QoS 2 QoS 3 None Hint 7). MQTT is best suited for? High-bandwidth video streaming Low-power IoT devices Database transactions Local file transfer None Hint 8). MQTT uses which protocol for transport? UDP TCP ICMP HTTP None Hint 9). A retained message in MQTT? Gets deleted immediately Remains stored by the broker Is only available to QoS 2 clients Works only with wildcards None Hint 10). In MQTT, topics are? Case-insensitive Hierarchical strings Limited to two levels Numeric only None Hint 11). The MQTT wildcard + matches? One topic level Multiple topic levels All devices Only retained messages None Hint 12). The MQTT wildcard # matches? Only one topic One level Multiple levels Only retained topics None Hint 13). Last Will and Testament (LWT) is used to? Encrypt MQTT packets Notify subscribers when a client disconnects unexpectedly Compress messages Manage topic trees None Hint 14). MQTT brokers include? Apache Kafka Mosquitto Hadoop Redis None Hint 15). Clean Session = true means? Persistent session All previous subscriptions are cleared Messages are retained forever Only QoS 2 is allowed None Hint 16). MQTT 5 introduced which new feature? QoS levels Shared subscriptions Publish–subscribe model TCP support None Hint 17). MQTT Keep Alive interval ensures? Data compression Client is still connected Topic authorization Message encryption None Hint 18). Which message is used by clients to subscribe to a topic? Connect Subscribe Publish Pingreq None Hint 19). Which MQTT packet is sent by the broker to confirm a subscription? CONNACK SUBACK PUBACK PINGRESP None Hint 20). MQTT over TLS commonly uses which port? 8883 80 161 1882 None Hint 21). MQTT PINGREQ is used to? Request topic list Verify connection with the broker Request message history Remove retained messages None Hint 22). MQTT clients identify themselves using? IP address Client ID MAC address Port number None Hint 23). MQTT messages with QoS 0 use which delivery guarantee? At least once At most once Exactly once Never once None Hint 24). MQTT topic levels are separated by? . - / \ None Hint 25). MQTT is mostly used in? Satellite TV Low-bandwidth IoT networks 4K video distribution Datacenter virtualization None Hint MQTT Protocol MCQs for Exams 26). The broker responds to PINGREQ with? PINGACK PINGOK PINGRESP ALIVEACK None Hint 27). MQTT session state includes? DNS records Subscriptions and pending QoS messages Log files OS configuration None Hint 28). The MQTT CONNECT packet includes? Username and password Topic tree Wildcard patterns Encryption key None Hint 29). MQTT 3.1.1 introduced? Shared subscriptions UTF-8 encoded topic strings Topic aliases User properties None Hint 30). MQTT 5.0 allows which new property in messages? Payload key User Properties Topic separator Multi-brokers None Hint 31). MQTT publish message contains? Topic + payload Only payload Only topic Only QoS None Hint 32). MQTT payload supports? Only text JSON only Binary data HTML only None Hint 33). MQTT LWT is configured during? SUBSCRIBE CONNECT DISCONNECT PUBLISH None Hint 34). Which is a lightweight MQTT client library? TensorFlow Paho PyTorch React None Hint 35). Which MQTT packet ends the session gracefully? END STOP DISCONNECT FIN None Hint 36). MQTT is optimized for? Low latency High video throughput Multimedia streaming Blockchain None Hint 37). Retained message clears if a client publishes a message with? NULL topic Zero-length payload QoS 2 only No keepalive None Hint 38). Shared subscription format is? $load/share/topic $share/{group}/topic \#share/{group} share/topic/{group} None Hint 39). Which MQTT flag identifies retained messages? R 0 1 RETAIN flag None Hint 40). When a client subscribes to a topic with #, it receives? All levels under that hierarchy Only retained messages Only QoS 2 messages Only configuration data None Hint 41). MQTT supports maximum QoS of? 0 1 2 3 None Hint 42). Messages with QoS 1 use which acknowledgment? PUBRESP PUBACK SUBACK CONNRESP None Hint 43). Which packet is part of the QoS 2 handshake? PUBSTOP PUBREC PUBFAIL MSGACK None Hint 44). QoS 2 handshake involves? 2 packets 3 packets 4 packets 5 packets None Hint 45). MQTT runs on? TCP only TCP and WebSockets HTTP FTP None Hint 46). In MQTT, topic names? Cannot start with $ Can start with $ for system topics Must start with home. Must be numbers None Hint 47). MQTT does NOT support? Multicast QoS Session persistence Authentication None Hint 48). MQTT client subscriptions are stored? In the client device In the broker In DNS In NAT router None Hint 49). If Clean Session = false? Broker saves subscription state No message is saved LWT is disabled All QoS become zero None Hint 50). MQTT persistent sessions support QoS 0 only QoS 1 and QoS 2 WebSockets only Temporary topics None Hint MQTT Protocol MCQs for Interviews 51). MQTT security is enhanced using? TLS DHCP ARP SNMP None Hint 52). MQTT uses which type of addressing? Hierarchical topic addressing IP addressing only MAC-level addressing UUID-only addressing None Hint 53). MQTT topics cannot contain? Spaces Wildcards in publishing Hyphens Numbers None Hint 54). MQTT is suitable for? Smart home systems Large ERP databases Video streaming High-frequency trading None Hint 55). MQTT packet that confirms QoS2 publish completion? PUBEND PUBCOMP PUBDONE COMPACK None Hint 56). MQTT 5 introduced? Topic aliases TCP migration UDP mode Binary topics only None Hint 57). Topic aliases help reduce Encryption Message size Authentication steps Memory usage None Hint 58). MQTT DISCONNECT in v5 can include? Authentication token Reason codes Topic tree Wildcard filter None Hint 59). MQTT Message expiry helps? Store messages forever Delete messages after given time Compress payload Reset broker None Hint 60). MQTT is particularly efficient because it uses? XML formatting Complex headers Very small packet size None 61). MQTT client automatically resubscribes after reconnect when Clean session = true Clean session = false QoS = 0 LWT enabled None Hint 62). MQTT CONNECT failure is indicated by? SUBACK CONNACK with error code DISCONNECT PINGRESP None Hint 63). MQTT LWT triggers when? Client voluntarily disconnects Client crashes unexpectedly QoS mismatch Topic not found None Hint 64). MQTT broker’s main job? Broadcast messages to all clients Route messages to subscribers Maintain DNS Generate topics None Hint 65). Which is NOT an MQTT broker? Mosquitto EMQX HiveMQ PostgreSQL None Hint 66). MQTT clients may use which authentication? JWT Username/password Certificates All of the above None Hint 67). MQTT message ordering is guaranteed? Never Per topic Broker-wide For all messages globally None Hint 68). MQTT WebSocket port commonly? 9001 22 3306 53 None Hint 69). MQTT brokers scale using? Clustering Clustering DHCP leasing ARP caching None Hint 70). MQTT subscription is? One-time Persistent depending on session Always temporary For retained messages only None Hint 71). A zero-byte Client ID is allowed when? Clean session = true Clean session = false QoS = 2 LWT enabled None Hint 72). MQTT ensures low power usage by? UDP usage Small headers High-latency retries Using JSON only None Hint 73). Which MQTT feature detects dead clients? Wildcards Retain flag LWT WebSockets None Hint 74). MQTT topic tree root for system topics is? root/ $SYS/ system/ topics/ None Hint 75). MQTT payload size maximum (standard limit)? 1 MB 256 MB 268 MB Unlimited None Hint MQTT Protocol MCQs for Quiz 76). MQTT 5 enhanced error handling with? Status flags Reason codes Exceptions Ping logs None Hint 77). MQTT is ideal for? Temperature sensors YouTube streaming RAID storage Audio editing None Hint 78). Wildcard subscriptions cannot be used with? Root topics Publish operations System topics Retained publications None Hint 79). MQTT’s minimal header size is? 2 bytes 20 bytes 1 KB 5 bytes None Hint 80). MQTT message flow is? Publisher → Broker → Subscriber Publisher → Subscriber Broker → Publisher Client → Router → Broker None Hint 81). MQTT broker may reject a publish due to? Authentication error Topic permission Packet too large All of the above None Hint 82). MQTT uses which encoding for topics? ASCII UTF-8 Base64 Hex None Hint 83). Session Expiry Interval is part of? MQTT 3 MQTT 5 MQTT v1 only Deprecated features None Hint 84). MQTT bridging connects? Two topics Two brokers Two clients Client and router None Hint 85). MQTT disconnect without notifying broker leads to? LWT message Forced retention QoS 2 only Subscription deletion None Hint 86). Which MQTT feature reduces congestion for many subscribers? Shared subscriptions Wildcards LWT TLS None Hint 87). MQTT message duplication may occur at? QoS 0 QoS 1 QoS 2 All of the above None Hint 88). MQTT 5 allows limiting? Client IP Message rate QoS level D. Will topic None Hint 89). MQTT retained messages are sent? Only to existing subscribers To new subscribers immediately Only once per day Only with QoS 2 None Hint 90). MQTT topic names cannot contain? Emoji Null character Unicode characters Slashes None Hint 91). MQTT SUBSCRIBE packet can include? Multiple topics Only one topic Only wildcards Only system topics None Hint 92). MQTT 5 feature that optimizes bandwidth? Message expiry Topic alias User properties Shared subscriptions None Hint 93). If a client publishes faster than the broker can handle? Broker crashes Client is throttled All messages fail QoS is reduced None Hint 94). MQTT UNSUBSCRIBE removes? Topic Token Subscription Payload None Hint 95). MQTT supports? Request/response pattern Publish/subscribe only Multicast only Store-and-forward only None Hint 96). A client failing authentication receives? SUBACK AUTHFAIL CONNACK with error DISCONNECT only None Hint 97). MQTT persistent queue stores? Only system messages QoS 1/2 messages when subscriber offline Retained messages only No messages None Hint 98). Last Will message cannot be? Retained QoS 0 QoS 1 QoS 2 None Hint 99). MQTT is widely used in? Industrial IoT Gaming engines Streaming servers Video editing None Hint 100).The smallest MQTT control packet is? PUBLISH PINGREQ SUBSCRIBE CONNECT None Hint Time's up