Mqtt

Introduction

  • MQTT is a featherweight, ISO complaint PUB-SUB messaging protocol.
  • Designed for low powered devices
  • PRAM consistent: Guaranteed in-order delivery per-publisher
  • Multiple Transport: TCP, TLS, Websockets
  • Flexible: Arbitrary message up to 256 MB
  • Topics can also be used for Key-Value storage

Topic based Pub/Sub

  • Decouples Publisher and Subscribers

Quality of Service

  • QoS 0 - “Fire and Forget”
  • Q0S 1 - “At least once”
  • QoS 2 - “Exactly once; 2 phase commit”

Ideal for intermittent connectivity; Sessions may last weeks or months Supports Disconnect & Last Will & Testament message

  • MQTT supports Retained messages which are automatically delivered when a client subscribes to a topic.