{"slug":"queue-mqtt-stomp","title":"Connecting via MQTT & STOMP","description":"Managed RabbitMQ queues speak more than AMQP. Once you enable external DNS on a queue,","section":"Features","url":"https://docs.danubedata.ro/queue-mqtt-stomp","markdown_url":"https://docs.danubedata.ro/queue-mqtt-stomp.md","breadcrumbs":[{"title":"Features","slug":null},{"title":"Queues","slug":"queue-mqtt-stomp"}],"headings":[{"level":1,"title":"Connecting via MQTT & STOMP","id":"connecting-via-mqtt-stomp"},{"level":2,"title":"Available protocols","id":"available-protocols"},{"level":2,"title":"Authentication","id":"authentication"},{"level":2,"title":"Choosing a virtual host (MQTT)","id":"choosing-a-virtual-host-mqtt"},{"level":2,"title":"MQTT topics","id":"mqtt-topics"},{"level":2,"title":"Example (Python, paho-mqtt, plaintext)","id":"example-python-paho-mqtt-plaintext"},{"level":2,"title":"Example (Python, stomp.py, plaintext)","id":"example-python-stomppy-plaintext"}],"format":"markdown","word_count":324,"content":"# Connecting via MQTT & STOMP\n\nManaged RabbitMQ queues speak more than AMQP. Once you **enable external DNS** on a queue,\neach protocol is reachable on its own dedicated port on the queue's hostname. The exact ports\nare shown in the dashboard under **Connect to your queue** — they are unique per instance, so\ndo not assume RabbitMQ's standard port numbers.\n\nEnabling external DNS also opens the queue's firewall automatically, so external clients can\nconnect right away — there's no separate firewall rule to add. Turning external access back off\ncloses that path again.\n\n## Available protocols\n\n| Protocol | Encryption | Notes |\n|----------|------------|-------|\n| AMQP     | Plaintext  | Default messaging protocol (AMQP 0-9-1) |\n| AMQPS    | TLS        | AMQP over TLS |\n| MQTT     | Plaintext  | IoT / pub-sub |\n| MQTTS    | TLS        | MQTT over TLS |\n| STOMP    | Plaintext  | Simple text-oriented messaging |\n| STOMPS   | TLS        | STOMP over TLS |\n\nUse the **port shown in your dashboard**, not 1883/8883/61613 — those are the broker's internal\nports. Externally each instance gets its own high-numbered port per protocol.\n\n## Authentication\n\nAnonymous access is disabled. Always supply your username (`admin`) and password. The credentials\nare on the queue's detail page.\n\n## Choosing a virtual host (MQTT)\n\nMQTT connections use your instance's configured virtual host by default. To target a *different*\nvhost, prefix the username with `vhost:` — for example, username `orders:admin` connects user\n`admin` into the `orders` vhost.\n\n## MQTT topics\n\nRabbitMQ's MQTT integration routes through the built-in `amq.topic` exchange. If you bridge MQTT\ntopics over AMQP, bind against `amq.topic`.\n\n## Example (Python, paho-mqtt, plaintext)\n\n```python\nimport paho.mqtt.client as mqtt\n\nc = mqtt.Client()\nc.username_pw_set(\"admin\", \"<password>\")\nc.connect(\"<your-host>\", <mqtt-port-from-dashboard>)\nc.loop_start()\nc.publish(\"demo/topic\", \"hello\")\n```\n\nFor MQTTS, use the MQTTS port from the dashboard and enable TLS (`c.tls_set()`).\n\n## Example (Python, stomp.py, plaintext)\n\n```python\nimport stomp\n\nconn = stomp.Connection([(\"<your-host>\", <stomp-port-from-dashboard>)])\nconn.connect(\"admin\", \"<password>\", wait=True)\nconn.send(destination=\"/queue/demo\", body=\"hello\")\nconn.disconnect()\n```\n\nFor STOMPS, point the connection at the STOMPS port from the dashboard and enable TLS with\n`conn.set_ssl(for_hosts=[(\"<your-host>\", <stomps-port-from-dashboard>)])`.\n","prev":{"title":"Management","slug":"managed-apps-management","url":"https://docs.danubedata.ro/managed-apps-management","markdown_url":"https://docs.danubedata.ro/managed-apps-management.md","json_url":"https://docs.danubedata.ro/managed-apps-management.json"},"next":{"title":"Connecting via MQTT & STOMP","slug":"queue-mqtt-stomp","url":"https://docs.danubedata.ro/queue-mqtt-stomp","markdown_url":"https://docs.danubedata.ro/queue-mqtt-stomp.md","json_url":"https://docs.danubedata.ro/queue-mqtt-stomp.json"},"index_url":"https://docs.danubedata.ro/index.json"}