Basic terminology

Until now terms such as a central broker, topic, publish, subscribe terms have been used, so it is time to explain them using an analogy with a post office and the messages are newspapers or magazines:

  • Broker: It is a software application (postal office) that receives messages (magazines) from clients (editors), and routes the messages according to the subscriber's requests.
  • Client: It is a device that can publish a message (magazine) or can receive a message (magazine) or both.
  • Topic: It is a string (magazine) that is used by the broker to filter messages for each connected clients. It is sent by clients to the broker in a subscribe request to express the desire in receiving messages published by other clients. It is sent by the clients when publishing messages to any other client that subscribed on the same topic.
  • Publish: Action of sending a message (magazine) to another client on a specific topic.
  • Subscribe: Action of informing the broker about an interest in receiving future messages published by other clients on that topic. A client can subscribe to multiple topics.
  • Unsubscribe: Action of a client that is telling the broker not to send messages to the specified topic.
MQTT Architecture

Since one characteristic of MQTT is flexible subscription topics, let's see how a topic is formed. Topics consist of a hierarchical level using a / as a topic level separator.

Here are examples of valid topics:

  • Europe/France/Paris/temperature
  • 62/livingroom/temperature
  • 456733-a55h56-667743/battery

Topics are case-sensitive so Europe/France/Paris/temperature is different than europe/France/Paris/temperature.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.190.219.49