<entity>
  <id>mqtt</id>
  <title>MQTT</title>
  <type>protocol</type>
  <slug>mqtt</slug>
  <content># MQTT

MQTT ist ein leichtgewichtiges Publish-Subscribe-Protokoll für IoT- und M2M-Kommunikation.

## Warum relevant?

MQTT eignet sich für instabile Netzwerke und ressourcenarme Geräte. Es reduziert Overhead und bietet klare Topic-basierte Kommunikation.

## Typischer Ablauf

```mermaid
sequenceDiagram
  participant Device as IoT Device
  participant Broker as MQTT Broker
  participant App as Consumer App

  Device-&gt;&gt;Broker: CONNECT
  Device-&gt;&gt;Broker: PUBLISH sensor/temp
  Broker-&gt;&gt;App: FORWARD sensor/temp
```</content>
  <metadata>
    <aliases>Message Queue Telemetry Transport</aliases>
    <tags>iot</tags>
    <tags>messaging</tags>
    <tags>publish-subscribe</tags>
    <ports>1883</ports>
    <ports>8883</ports>
    <relations>
      <uses>tcp</uses>
      <uses>tls</uses>
      <secured_by>tls</secured_by>
      <commonly_used_with>node-red</commonly_used_with>
      <commonly_used_with>grafana</commonly_used_with>
      <alternative_to>amqp</alternative_to>
      <alternative_to>coap</alternative_to>
    </relations>
  </metadata>
  <relations>
    <relation_type>uses</relation_type>
    <target_id>tcp</target_id>
  </relations>
  <relations>
    <relation_type>uses</relation_type>
    <target_id>tls</target_id>
  </relations>
  <relations>
    <relation_type>secured_by</relation_type>
    <target_id>tls</target_id>
  </relations>
  <relations>
    <relation_type>commonly_used_with</relation_type>
    <target_id>node-red</target_id>
  </relations>
  <relations>
    <relation_type>commonly_used_with</relation_type>
    <target_id>grafana</target_id>
  </relations>
  <relations>
    <relation_type>alternative_to</relation_type>
    <target_id>amqp</target_id>
  </relations>
  <relations>
    <relation_type>alternative_to</relation_type>
    <target_id>coap</target_id>
  </relations>
</entity>
