CloudSignal Docs
GuidesMQTT Fundamentals

MQTT fundamentals

Learn the core concepts of MQTT messaging that power CloudSignal.

MQTT is a lightweight publish-subscribe messaging protocol designed for constrained devices and unreliable networks. Read this section if you're new to MQTT and want to understand how topics, QoS, and retained messages shape what CloudSignal can do for you.

Core concepts

Publish-subscribe pattern

Unlike request-response APIs, MQTT uses publish-subscribe:

PatternFlow
Traditional APIClient sends request to server, server sends response back to client
MQTTPublisher sends to a topic, broker routes to all matching subscribers, no direct client-to-client connection

Key components

ComponentDescription
BrokerCloudSignal's server that routes messages
ClientAny application or service connecting to the broker
TopicNamed channel for messages (for example, agents/agent-001/state)
MessageData payload sent to a topic
QoSQuality of service, delivery guarantees

Message flow

Message flow
Agent publishes
agents/agent-001/state
PUBLISH
Broker receives
Route
Deliver to subscribers

Why MQTT?

FeatureBenefit
LightweightMinimal bandwidth, works on slow connections
Persistent sessionsMessages delivered even after reconnection
Retained messagesNew subscribers get the last value immediately
QoS levelsChoose delivery guarantees per message
Last willNotify others when a client disconnects unexpectedly

Guides

CloudSignal + MQTT

CloudSignal extends standard MQTT with:

FeatureDescription
Organization isolationYour data is separate from other customers
Token-based authTemporary credentials for untrusted clients
Dashboard managementCreate users, ACLs, and monitor sessions
Persistent sessionsYour session state survives reconnections
Message retentionStore messages for up to 30 days

Quick reference

Connect:    mqtts://mqtt.cloudsignal.app:8883
Username:   your-user@your-org-id
Topics:     any/topic/you/want
QoS:        0, 1, or 2

Start with Topics & wildcards to understand MQTT's addressing system.

On this page