Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:iot-open:networking2:applicationnetworkprotocols [2024/08/28 15:55] – ToDo checked: AMQP higher resolutions pczekalskien:iot-open:networking2:applicationnetworkprotocols [2024/08/28 15:56] (current) pczekalski
Line 64: Line 64:
 The Broker provides QoS (Quality of Service) and can retain message payload. MQTT Broker QoS (supplied at the message level) has three levels. The Broker provides QoS (Quality of Service) and can retain message payload. MQTT Broker QoS (supplied at the message level) has three levels.
   * Unacknowledged service: Ensures that MQTT message is delivered at most once to each subscriber.   * Unacknowledged service: Ensures that MQTT message is delivered at most once to each subscriber.
-  * Acknowledged service: Ensures message delivery at least once to every subscriber. The Broker expects acknowledgement to be sent from the subscriber. Otherwise, it retransmits data.+  * Acknowledged service: Ensures message delivery to every subscriber at least once. The Broker expects acknowledgement to be sent from the subscriber. Otherwise, it retransmits data.
   * Assured service: This two-step message delivery ensures the transmission is delivered exactly once to every subscriber.   * Assured service: This two-step message delivery ensures the transmission is delivered exactly once to every subscriber.
 Providing unique packet IDs in the MQTT frame is vital for Acknowledged and Assured services.\\ Providing unique packet IDs in the MQTT frame is vital for Acknowledged and Assured services.\\
Line 75: Line 75:
     * otherwise, the Broker collects messages (QoS depending) and delivers them on client reconnecting; thus, connections remain idle.     * otherwise, the Broker collects messages (QoS depending) and delivers them on client reconnecting; thus, connections remain idle.
   * MQTT "will" - on connection loss, the Broker will automatically "simulate" publishing of the predefined MQTT message (Topic and payload). All clients subscribing to this message (whether directly or via a wildcard) will be notified immediately. It is an excellent feature for failure/disaster discovery.   * MQTT "will" - on connection loss, the Broker will automatically "simulate" publishing of the predefined MQTT message (Topic and payload). All clients subscribing to this message (whether directly or via a wildcard) will be notified immediately. It is an excellent feature for failure/disaster discovery.
-  * message retaining: it is a feature for regular messages. Any message can be set as retaining; in such case, the Broker will keep the last one. Once a new client subscribes to a topic will receive a retained message immediately, even if the publisher is not publishing any message. This feature is **last known good value**. It is good to present the publisher's state, e.g. the publisher sends a retained message meaning "I'm going offline" and then disconnects. Any client connecting will be notified immediately about the device (client) state.\\+  * message retaining: it is a feature for regular messages. Any message can be set as retaining; in such case, the Broker will keep the last one. Once a new client subscribes to a topic, they will receive a retained message immediately, even if the publisher is not publishing any message. This feature is **last known good value**. It is good to present the publisher's state, e.g. the publisher sends a retained message meaning "I'm going offline" and then disconnects. Any client connecting will be notified immediately about the device (client) state.\\
  
 Interestingly, MQTT is a protocol used by Facebook Messenger ((https://www.facebook.com/notes/facebook-engineering/building-facebook-messenger/10150259350998920/)). It is also implemented natively in Microsoft Azure and Amazon Web Services (among many others). Interestingly, MQTT is a protocol used by Facebook Messenger ((https://www.facebook.com/notes/facebook-engineering/building-facebook-messenger/10150259350998920/)). It is also implemented natively in Microsoft Azure and Amazon Web Services (among many others).
Line 143: Line 143:
 <caption>AMQP protocol messages flow</caption> <caption>AMQP protocol messages flow</caption>
 </figure> </figure>
-<todo @pczekalski #pczekalski:2024-08-28>AMQP higher resolutions</todo> 
 AMQP uses TCP/IP. AMQP is intended to work in non-reliable networks; thus, the protocol has a message acknowledgement mechanism to ensure delivery. A message is removed from the queue only if it has been acknowledged. Besides acknowledged delivery, it is also possible to use an unacknowledged one that does not involve acknowledgements. If a message cannot be routed (for any reason), it can be returned to the publisher, dropped or placed in the "dead letter queue". The behaviour is defined along with a message. Opposite to MQTT, in AMQP protocol, the connection status is unknown; thus, there is no mechanism to let other devices know that some node has disconnected, such as the last will in MQTT.  AMQP uses TCP/IP. AMQP is intended to work in non-reliable networks; thus, the protocol has a message acknowledgement mechanism to ensure delivery. A message is removed from the queue only if it has been acknowledged. Besides acknowledged delivery, it is also possible to use an unacknowledged one that does not involve acknowledgements. If a message cannot be routed (for any reason), it can be returned to the publisher, dropped or placed in the "dead letter queue". The behaviour is defined along with a message. Opposite to MQTT, in AMQP protocol, the connection status is unknown; thus, there is no mechanism to let other devices know that some node has disconnected, such as the last will in MQTT. 
  
en/iot-open/networking2/applicationnetworkprotocols.1724860528.txt.gz · Last modified: 2024/08/28 15:55 by pczekalski
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0