Unit 5: Messaging Queues and Publish/Subscribe Communications - Practice Quiz

ECE128 — Introduction To Iot Networking Protocols 60 Questions
0 Correct 0 Wrong 60 Left
0/60

1 What does MQTT stand for?

Message Queue Telemetry Transport Easy
A. Managed Query Transfer Technique
B. Machine Queue Transmission Process
C. Message Queuing Telemetry Transport
D. Message Quality Tracking Protocol

2 Which communication model is primarily used by MQTT?

Message Queue Telemetry Transport Easy
A. Circuit-switched communication
B. Publish/subscribe messaging
C. Client-to-client file sharing
D. Peer-to-peer video streaming

3 What is the main role of an MQTT broker?

Message Queue Telemetry Transport Easy
A. To encrypt every network packet
B. To route messages between clients
C. To manufacture IoT sensors
D. To provide electrical power to devices while also storing all sensor measurements permanently

4 In MQTT, what is a topic?

Message Queue Telemetry Transport Easy
A. A physical sensor component
B. A wireless encryption key
C. A device battery setting
D. A named channel for messages

5 Which protocol is generally designed to be lightweight for constrained IoT devices?

MQTT versus AMQP Easy
A. AMQP
B. FTP
C. MQTT
D. SMTP

6 What does AMQP stand for?

MQTT versus AMQP Easy
A. Advanced Mobile Queue Procedure
B. Automated Machine Query Process
C. Application Messaging Quality Profile
D. Advanced Message Queuing Protocol

7 Compared with MQTT, AMQP commonly provides which characteristic?

MQTT versus AMQP Easy
A. Direct electrical control of connected sensors
B. Operation without any network connection
C. More advanced message-queuing features
D. Lower protocol complexity in every implementation

8 What is the purpose of session initiation in an IoT system?

Session initiation for the Internet of Things Easy
A. To permanently delete device firmware
B. To establish a communication session
C. To physically assemble an IoT device
D. To replace all application messages with network-routing tables maintained by every connected device

9 Which information may be negotiated during IoT session initiation?

Session initiation for the Internet of Things Easy
A. Building ownership records
B. Device casing color
C. Communication parameters
D. Sensor manufacturing date

10 What is a major advantage of the publish/subscribe model?

Advantages and disadvantages of the publish/subscribe model Easy
A. Messages can be delivered only when every subscriber is connected at exactly the same moment
B. All devices must use identical hardware
C. Every publisher must know each subscriber directly
D. Publishers and subscribers are loosely coupled

11 What is a possible disadvantage of broker-based publish/subscribe communication?

Advantages and disadvantages of the publish/subscribe model Easy
A. Publishers must always use wired networks
B. Subscribers cannot receive topic messages
C. The broker may become a failure point
D. Each sensor must contain a complete database server with permanent storage and administrative tools

12 Why can publish/subscribe systems scale well?

Advantages and disadvantages of the publish/subscribe model Easy
A. Every subscriber becomes a physical router
B. One publication can reach many subscribers
C. Each message is limited to one receiver
D. All publishers must wait for direct replies

13 Why are lightweight sessions useful in IoT environments?

Lightweight Sessions in the IoT Easy
A. They require unlimited processing capacity
B. They make every constrained device run a full desktop operating system with all services enabled
C. They increase the physical size of sensors
D. They reduce resource and communication overhead

14 Which device is most likely to benefit from a lightweight session protocol?

Lightweight Sessions in the IoT Easy
A. A dedicated video-editing computer
B. A data-center storage server
C. A high-end desktop workstation
D. A battery-powered temperature sensor

15 What is the primary goal of a constrained session-initiation protocol?

A protocol for constrained session initiation Easy
A. To replace sensors with cloud servers
B. To require every endpoint to maintain extensive multimedia records throughout the device lifetime
C. To maximize message size during setup
D. To establish sessions with low overhead

16 Which feature is desirable in a protocol for constrained session initiation?

A protocol for constrained session initiation Easy
A. Continuous desktop-class processing
B. Large mandatory headers
C. High memory consumption
D. Compact signaling messages

17 What normally happens first in session initiation?

Session initiation Easy
A. Both endpoints erase their configurations
B. Every network device downloads and installs a new operating system before any request is transmitted
C. The active session is immediately terminated
D. An endpoint sends a session request

18 What does a successful response to a session-initiation request indicate?

Session initiation Easy
A. The network has permanently failed
B. The requesting endpoint must delete its identity
C. The session can be established
D. The device battery has been removed

19 What is the purpose of session tear-down?

Session tear-down Easy
A. To end a communication session
B. To increase the sensor sampling rate
C. To preserve every allocated communication resource indefinitely even after both endpoints have finished
D. To begin a new device-manufacturing process

20 Which action is an example of session modification?

Session modification Easy
A. Destroying the communicating devices
B. Replacing the entire physical network
C. Ending the session without requesting any change
D. Changing an active session parameter

21 A battery-powered sensor sends readings over an unreliable wireless link. Every reading must reach the broker at least once, and occasional duplicates are acceptable. Which MQTT QoS level should be used?

Message Queue Telemetry Transport Medium
A. QoS 1
B. QoS 3
C. QoS 2
D. QoS 0

22 A device publishes a retained message containing the latest room temperature. What happens when a new subscriber later subscribes to that topic?

Message Queue Telemetry Transport Medium
A. It requests the value directly from the device
B. It receives the retained temperature immediately
C. It receives only future temperature values
D. It waits until the publisher reconnects

23 A monitoring application subscribes to factory/+/temperature. Which published topic will match this MQTT subscription?

Message Queue Telemetry Transport Medium
A. factory/zone1/motor/temperature
B. factory/temperature
C. office/zone1/temperature
D. factory/zone1/temperature

24 An MQTT client needs the broker to notify subscribers if the client disconnects unexpectedly. Which feature should the client configure?

Message Queue Telemetry Transport Medium
A. Last Will and Testament
B. Topic alias
C. Retained subscription
D. Keep-alive response

25 A small environmental sensor has limited memory and transmits short telemetry messages. Which protocol is generally the more suitable starting choice?

MQTT versus AMQP Medium
A. MQTT with exactly-once delivery only
B. AMQP with complex routing rules
C. AMQP with broker-side transactions
D. MQTT with a lightweight client

26 A financial backend requires transactions, flexible queue routing, and enterprise messaging semantics. Which protocol is generally more appropriate?

MQTT versus AMQP Medium
A. CoAP
B. MQTT
C. AMQP
D. SIP

27 Why might MQTT consume fewer network resources than AMQP for simple sensor reporting?

MQTT versus AMQP Medium
A. MQTT uses smaller control headers
B. MQTT avoids using a broker
C. MQTT guarantees zero retransmissions
D. MQTT always uses UDP transport

28 A temperature sensor publishes data without knowing which dashboards or alert services will consume it. Which publish/subscribe advantage does this demonstrate?

Advantages and disadvantages of the publish/subscribe model Medium
A. Space decoupling
B. Payload encryption
C. Ordered execution
D. Direct addressing

29 A broker fails, causing communication to stop for every publisher and subscriber connected only to that broker. Which disadvantage is illustrated?

Advantages and disadvantages of the publish/subscribe model Medium
A. A fixed payload format
B. A mandatory polling delay
C. A central point of failure
D. A direct device dependency

30 A publisher sends data while a subscriber is temporarily offline. Which mechanism most directly helps the subscriber receive the missed data after reconnecting?

Advantages and disadvantages of the publish/subscribe model Medium
A. Stateless subscriptions without storage
B. Frequent publisher address changes
C. Persistent sessions with queued messages
D. Shorter topic names with wildcards

31 Before establishing an IoT communication session, two devices must determine whether they support compatible media formats and transport parameters. What is this process called?

Session initiation for the Internet of Things Medium
A. Capability negotiation
B. Queue replication
C. Payload sampling
D. Topic retention

32 Why can a conventional session initiation mechanism be inefficient for a constrained IoT node?

Session initiation for the Internet of Things Medium
A. Its operation always requires satellite connectivity
B. Its sessions cannot be modified after establishment
C. Its messages cannot identify communication endpoints
D. Its signaling may require excessive bytes and processing

33 A sleeping IoT node wakes briefly to exchange data and then returns to sleep. Which session design best conserves its energy?

Lightweight Sessions in the IoT Medium
A. Frequent renegotiation of every parameter
B. Continuous signaling with permanent state
C. Minimal signaling with short-lived state
D. Repeated discovery before every packet

34 A constrained device reconnects frequently because its wireless connection is intermittent. Which technique most directly reduces repeated session setup overhead?

Lightweight Sessions in the IoT Medium
A. Larger payloads during each reconnection
B. Full negotiation after every disconnection
C. Session resumption using saved parameters
D. New device identities for every session

35 A constrained session initiation protocol runs over an unreliable datagram transport. Which mechanism is needed to improve signaling reliability?

A protocol for constrained session initiation Medium
A. Queue exchanges with transactional commits
B. Topic wildcards with retained publications
C. Permanent connections with no acknowledgments
D. Message identifiers with timed retransmissions

36 Which design change would most effectively reduce the signaling size of a session initiation protocol for constrained devices?

A protocol for constrained session initiation Medium
A. Repeat all headers in every response
B. Add multiple acknowledgments per request
C. Encode each parameter as descriptive prose
D. Use compact fields and omit optional metadata

37 An endpoint receives a session invitation and accepts the proposed parameters. What should happen next to confirm that both endpoints recognize the established session?

Session initiation Medium
A. A new broker should replace the endpoint
B. A teardown request should release the resources
C. A retained message should restart negotiation
D. A confirmation message should complete the exchange

38 A sensor has finished streaming data and intentionally ends its session. Why is an explicit tear-down message preferable to simply becoming silent?

Session tear-down Medium
A. It guarantees that all future packets use less bandwidth
B. It automatically creates a replacement communication path
C. It preserves the session indefinitely without stored state
D. It allows both sides to release session resources promptly

39 A device loses power before sending a session tear-down message. Which mechanism should the remote endpoint use to avoid retaining the session forever?

Session tear-down Medium
A. An inactivity timeout
B. A retained publication
C. A wildcard subscription
D. A capability advertisement

40 During an active video-monitoring session, available bandwidth decreases. What is the most appropriate session modification?

Session modification Medium
A. Repeat the original parameters unchanged
B. Create unrelated topic names
C. Renegotiate a lower data rate
D. Disable all session identifiers

41 An MQTT 5.0 publisher sends a QoS 1 message with a Message Expiry Interval of 30 seconds. A matching subscriber has a persistent session but remains disconnected for 45 seconds. What should the broker do with the queued message?

Message Queue Telemetry Transport Hard
A. Reset the expiry interval when the subscriber reconnects
B. Deliver the message immediately when the subscriber reconnects
C. Convert the message to QoS 0 and retain it
D. Discard the message when its expiry interval elapses

42 A publisher sends an MQTT message at QoS 2, while a matching subscription was created with maximum QoS 1. At what QoS is the message delivered to that subscriber?

Message Queue Telemetry Transport Hard
A. QoS 2 with a QoS 1 acknowledgment sequence
B. QoS 2 because the publisher selected exactly-once delivery
C. QoS 1 because delivery is capped by the subscription
D. QoS 0 because QoS levels cannot be translated

43 An MQTT client reconnects with the same Client Identifier after losing its connection midway through a QoS 2 exchange. Which configuration best allows the exchange to continue without treating the client as a new session?

Message Queue Telemetry Transport Hard
A. Clean Start set to 0 with Message Expiry Interval 0
B. Clean Start set to 1 with Session Expiry Interval 0
C. Clean Start set to 0 with a nonzero Session Expiry Interval
D. Clean Start set to 1 with Receive Maximum set to 1

44 A device publishes retained state ON to plant/pump/state, then later publishes a retained message with a zero-byte payload to the same topic. What is the resulting broker behavior?

Message Queue Telemetry Transport Hard
A. The retained state is removed from the broker
B. The retained state becomes an empty retained publication
C. The retained state remains ON until its session expires
D. The retained state is delivered only to existing subscribers

45 An IoT backend requires broker-enforced routing based on multiple message headers, transactional grouping, and interoperable link-level flow control between heterogeneous vendors. Which protocol is the stronger direct fit?

MQTT versus AMQP Hard
A. MQTT, because retained messages provide transactional grouping
B. AMQP, because its model includes rich routing and link semantics
C. AMQP, because it eliminates acknowledgments on constrained links
D. MQTT, because topic filters encode arbitrary header predicates

46 A battery-powered sensor sends small telemetry records over a high-latency link and requires only topic-based routing with modest protocol overhead. Which design choice is generally most appropriate?

MQTT versus AMQP Hard
A. AMQP, because every transfer uses a shorter fixed header
B. MQTT, because QoS 2 guarantees application-level uniqueness
C. AMQP, because sessions are unnecessary for reliable delivery
D. MQTT, because its compact control packets reduce overhead

47 A gateway must apply explicit receiver credit so that a fast producer cannot send more transfers than a downstream consumer has authorized. Which protocol mechanism directly expresses this requirement?

MQTT versus AMQP Hard
A. MQTT subscription identifiers
B. MQTT topic aliases
C. AMQP link credit
D. AMQP message annotations

48 A publisher emits an event while no subscribers are connected. The system must guarantee later delivery to an already registered consumer. Which additional property is essential beyond basic publish/subscribe decoupling?

Advantages and disadvantages of the publish/subscribe model Hard
A. Durable subscription state with persistent message storage
B. Wildcard matching with hierarchical topic names
C. Anonymous publishing with broker-side topic discovery
D. Retained delivery restricted to currently online consumers

49 Two subscribers independently consume every event from the same topic and each updates the same non-idempotent database record. Which publish/subscribe disadvantage is most directly exposed?

Advantages and disadvantages of the publish/subscribe model Hard
A. Publishers must know every subscriber's network address
B. Broker mediation eliminates horizontal consumer scaling
C. Fan-out can cause duplicated application-side effects
D. Topic filtering prevents asynchronous message delivery

50 A safety controller requires a command response within 50 ms and must know immediately whether a specific actuator accepted the command. Why can pure publish/subscribe be a poor fit without extra conventions?

Advantages and disadvantages of the publish/subscribe model Hard
A. It decouples endpoints and lacks an inherent request-response contract
B. It prevents actuators from publishing acknowledgment messages
C. It prohibits commands from carrying correlation identifiers
D. It requires all commands to use exactly-once broker delivery

51 A constrained camera and a monitoring client must establish a session, but they support several incompatible media encodings. Which initiation function is necessary before resources are committed?

Session initiation for the Internet of Things Hard
A. Disabling capability discovery to reduce message count
B. Assigning identical transport ports to both endpoints
C. Negotiating a mutually supported session description
D. Retaining the latest media packet at the broker

52 An IoT session setup request is retransmitted after its response is lost. The server has already allocated the requested session. Which design property best prevents the retransmission from creating a second session?

Session initiation for the Internet of Things Hard
A. A new resource path generated for every network attempt
B. A shorter session lifetime than the retransmission timer
C. A stable transaction identifier with duplicate detection
D. A different endpoint identifier on every retransmission

53 A sleepy IoT node communicates through a gateway and wakes only once per hour. Which session design minimizes energy use while preserving enough continuity to resume work?

Lightweight Sessions in the IoT Hard
A. Maintain continuous transport keepalives from the sleeping node
B. Keep all radio bearers active until explicit remote termination
C. Store compact resumable state at the gateway with bounded lifetime
D. Repeat complete capability negotiation for every application packet

54 A lightweight session protocol replaces periodic keepalives with a long inactivity timeout. What is the most important resource-management risk introduced by this change?

Lightweight Sessions in the IoT Hard
A. Stale session state may occupy memory for much longer
B. Active sessions are forced to renegotiate every packet
C. Endpoint addressing can no longer use constrained formats
D. Message authentication becomes mathematically impossible

55 A constrained session-initiation protocol runs over an unreliable datagram transport. A client sends a non-idempotent session-creation request, but the response is lost. Which protocol feature is most critical for safe retries?

A protocol for constrained session initiation Hard
A. Randomized payload encoding on every retry
B. Duplicate suppression tied to a request token
C. Unconditional allocation before request validation
D. Independent session creation for each retransmission

56 A constrained protocol compresses session descriptions by replacing common parameter names with numeric codes. Under which condition does this optimization remain interoperable?

A protocol for constrained session initiation Hard
A. Codes are defined by a shared and versioned registry
B. Unknown codes are interpreted as mandatory defaults
C. Numeric values are reused freely across protocol versions
D. Each endpoint assigns codes independently at connection time

57 During session establishment, an offer lists codecs in preference order C1, C2, C3; the answerer supports only C2 and C3 but selects C4. What is the correct outcome?

Session initiation Hard
A. Establish the session with C4 as the answerer's preference
B. Reject or correct the answer because C4 was not offered
C. Use C3 because it is the lowest common capability
D. Use C1 because the offerer's ordering always takes precedence

58 Endpoint A sends a session tear-down request, releases its local resources, and then receives a duplicate copy of the same request from the network. What behavior best supports robust tear-down?

Session tear-down Hard
A. Treat the duplicate idempotently and confirm termination
B. Allocate a new session identifier for the duplicate request
C. Recreate the session so that it can be terminated again
D. Interpret the duplicate as a session modification request

59 A constrained endpoint loses connectivity permanently without sending an explicit session tear-down. Which mechanism most reliably prevents the peer from retaining resources forever?

Session tear-down Hard
A. A permanent transport binding indexed by endpoint address
B. An unlimited retransmission loop for the last session message
C. A retained publication containing the original offer
D. A lease or inactivity timer that expires session state

60 Two endpoints simultaneously send incompatible session-modification offers for the same active session. Which strategy best avoids ending with divergent session state?

Session modification Hard
A. Use versioning and reject or serialize conflicting updates
B. Accept each local offer without waiting for confirmation
C. Apply both offers locally in their arrival order
D. Create a second session under the original identifier