In a client-server model, which statement best describes how communication happens?
Think about who initiates communication and who responds in client-server.
In client-server, clients initiate requests and servers respond directly to those requests. Servers do not broadcast messages unsolicited.
What is the main role of the broker in a publish-subscribe messaging model?
Consider how messages reach subscribers in publish-subscribe.
The broker receives messages from publishers and forwards them to subscribers who have expressed interest in specific topics.
Given an MQTT client subscribing to topic 'home/temperature', what output will it show when a message '22°C' is published to that topic?
mqtt_subscribe('home/temperature') # Message published: '22°C'
Think about what happens when you subscribe to a topic and a message is published to it.
The client receives and displays the message published to the subscribed topic.
An MQTT subscriber is not receiving messages from the broker. Which of the following is the most likely cause?
Check the topic subscription carefully.
If the subscriber does not subscribe to the correct topic, it will not receive messages published to that topic.
For a large network of IoT sensors sending data to multiple monitoring systems, which communication model is best and why?
Consider scalability and decoupling in large IoT networks.
Publish-subscribe allows many sensors to send data to a broker, which then distributes messages to multiple subscribers efficiently without sensors managing each connection.