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. Peer-to-peer video streaming
B. Circuit-switched communication
C. Client-to-client file sharing
D. Publish/subscribe messaging

3 What is the main role of an MQTT broker?

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

4 In MQTT, what is a topic?

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

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

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

6 What does AMQP stand for?

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

7 Compared with MQTT, AMQP commonly provides which characteristic?

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

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

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

9 Which information may be negotiated during IoT session initiation?

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

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. Each sensor must contain a complete database server with permanent storage and administrative tools
B. Publishers must always use wired networks
C. The broker may become a failure point
D. Subscribers cannot receive topic messages

12 Why can publish/subscribe systems scale well?

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

13 Why are lightweight sessions useful in IoT environments?

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

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

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

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

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

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. Compact signaling messages
C. High memory consumption
D. Large mandatory headers

17 What normally happens first in session initiation?

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

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

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

19 What is the purpose of session tear-down?

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

20 Which action is an example of session modification?

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

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 0
C. QoS 3
D. QoS 2

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 waits until the publisher reconnects
C. It receives the retained temperature immediately
D. It receives only future temperature values

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

Message Queue Telemetry Transport Medium
A. factory/zone1/temperature
B. factory/temperature
C. office/zone1/temperature
D. factory/zone1/motor/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. Topic alias
B. Last Will and Testament
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 a lightweight client
B. AMQP with complex routing rules
C. AMQP with broker-side transactions
D. MQTT with exactly-once delivery only

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

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

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

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

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. Direct addressing
B. Payload encryption
C. Ordered execution
D. Space decoupling

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 direct device dependency
B. A mandatory polling delay
C. A fixed payload format
D. A central point of failure

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. Shorter topic names with wildcards
D. Persistent sessions with queued messages

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. Topic retention
B. Capability negotiation
C. Payload sampling
D. Queue replication

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 sessions cannot be modified after establishment
B. Its signaling may require excessive bytes and processing
C. Its messages cannot identify communication endpoints
D. Its operation always requires satellite connectivity

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. Repeated discovery before every packet
C. Continuous signaling with permanent state
D. Minimal signaling with short-lived state

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. Session resumption using saved parameters
B. New device identities for every session
C. Full negotiation after every disconnection
D. Larger payloads during each reconnection

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. Topic wildcards with retained publications
B. Queue exchanges with transactional commits
C. Message identifiers with timed retransmissions
D. Permanent connections with no acknowledgments

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. Encode each parameter as descriptive prose
B. Repeat all headers in every response
C. Use compact fields and omit optional metadata
D. Add multiple acknowledgments per request

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 retained message should restart negotiation
B. A new broker should replace the endpoint
C. A confirmation message should complete the exchange
D. A teardown request should release the resources

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 automatically creates a replacement communication path
B. It preserves the session indefinitely without stored state
C. It guarantees that all future packets use less bandwidth
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. A retained publication
B. A wildcard subscription
C. An inactivity timeout
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. Renegotiate a lower data rate
B. Repeat the original parameters unchanged
C. Create unrelated topic names
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. Deliver the message immediately when the subscriber reconnects
B. Discard the message when its expiry interval elapses
C. Reset the expiry interval when the subscriber reconnects
D. Convert the message to QoS 0 and retain it

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 1 because delivery is capped by the subscription
B. QoS 2 with a QoS 1 acknowledgment sequence
C. QoS 2 because the publisher selected exactly-once delivery
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 0 with a nonzero Session Expiry Interval
C. Clean Start set to 1 with Receive Maximum set to 1
D. Clean Start set to 1 with Session Expiry Interval 0

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 remains ON until its session expires
B. The retained state is removed from the broker
C. The retained state becomes an empty retained publication
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. AMQP, because it eliminates acknowledgments on constrained links
B. AMQP, because its model includes rich routing and link semantics
C. MQTT, because topic filters encode arbitrary header predicates
D. MQTT, because retained messages provide transactional grouping

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. MQTT, because QoS 2 guarantees application-level uniqueness
B. MQTT, because its compact control packets reduce overhead
C. AMQP, because sessions are unnecessary for reliable delivery
D. AMQP, because every transfer uses a shorter fixed header

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. AMQP message annotations
B. AMQP link credit
C. MQTT topic aliases
D. MQTT subscription identifiers

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. Anonymous publishing with broker-side topic discovery
C. Wildcard matching with hierarchical topic names
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. Fan-out can cause duplicated application-side effects
B. Broker mediation eliminates horizontal consumer scaling
C. Topic filtering prevents asynchronous message delivery
D. Publishers must know every subscriber's network address

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 prevents actuators from publishing acknowledgment messages
B. It requires all commands to use exactly-once broker delivery
C. It decouples endpoints and lacks an inherent request-response contract
D. It prohibits commands from carrying correlation identifiers

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. Negotiating a mutually supported session description
B. Disabling capability discovery to reduce message count
C. Assigning identical transport ports to both endpoints
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 different endpoint identifier on every retransmission
C. A shorter session lifetime than the retransmission timer
D. A stable transaction identifier with duplicate detection

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. Keep all radio bearers active until explicit remote termination
B. Maintain continuous transport keepalives from the sleeping node
C. Repeat complete capability negotiation for every application packet
D. Store compact resumable state at the gateway with bounded lifetime

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. Message authentication becomes mathematically impossible
B. Active sessions are forced to renegotiate every packet
C. Stale session state may occupy memory for much longer
D. Endpoint addressing can no longer use constrained formats

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. Duplicate suppression tied to a request token
B. Unconditional allocation before request validation
C. Independent session creation for each retransmission
D. Randomized payload encoding on every retry

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. Unknown codes are interpreted as mandatory defaults
B. Numeric values are reused freely across protocol versions
C. Each endpoint assigns codes independently at connection time
D. Codes are defined by a shared and versioned registry

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. Use C3 because it is the lowest common capability
B. Establish the session with C4 as the answerer's preference
C. Use C1 because the offerer's ordering always takes precedence
D. Reject or correct the answer because C4 was not offered

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. Allocate a new session identifier for the duplicate request
B. Recreate the session so that it can be terminated again
C. Interpret the duplicate as a session modification request
D. Treat the duplicate idempotently and confirm termination

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. A lease or inactivity timer that expires session state
C. A retained publication containing the original offer
D. An unlimited retransmission loop for the last session message

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. Create a second session under the original identifier
B. Accept each local offer without waiting for confirmation
C. Use versioning and reject or serialize conflicting updates
D. Apply both offers locally in their arrival order