MQTT - amitsri/rostyman-releases GitHub Wiki
MQTT
Rostyman supports MQTT connections for lightweight publish-subscribe messaging.
Creating an MQTT Connection
- Click the + button in the tab bar โ MQTT
- Or use the New Request dialog and select MQTT
Connection
Broker URL
Enter your MQTT broker URL:
mqtt://localhost:1883โ standard MQTTmqtts://broker.example.com:8883โ MQTT over TLSws://localhost:8083/mqttโ MQTT over WebSocketwss://broker.example.com:8084/mqttโ MQTT over secure WebSocket
Connect / Disconnect
- Click Connect to establish a connection
- Status dot: gray (disconnected), yellow (connecting), green (connected), red (error)
- Click Disconnect to close the connection and clear all subscriptions
- Auto-reconnection is enabled (1s interval)
Tabs
Publish
Send messages to a topic:
- Topic โ the MQTT topic to publish to (e.g.,
sensors/temperature) - QoS โ Quality of Service level:
- QoS 0 โ At most once (fire and forget)
- QoS 1 โ At least once (acknowledged delivery)
- QoS 2 โ Exactly once (guaranteed delivery)
- Retain โ if checked, the broker stores this as the last known good message for the topic
- Message body โ JSON editor for the message payload
- Click Publish to send (only enabled when connected)
Subscribe
Manage topic subscriptions:
- Enter a topic pattern and select QoS level
- Click Subscribe to start receiving messages on that topic
- Active subscriptions are listed below with an ร button to unsubscribe
- Supports MQTT wildcards:
+(single level),#(multi level)- Example:
sensors/+/temperaturematchessensors/room1/temperature - Example:
sensors/#matches all topics undersensors/
- Example:
Settings
Configure connection options (set before connecting):
- Client ID โ unique identifier (auto-generated if empty)
- Username โ for broker authentication
- Password โ for broker authentication
- Keep Alive โ ping interval in seconds (default: 60)
Message Log
The bottom panel shows all communication:
- Sent (green โ) โ messages you published (with topic)
- Received (blue โ) โ messages from subscribed topics (with topic)
- System (ยท) โ connection, disconnection, subscription events
Filter buttons: All, Sent, Received, System. Clear button to reset the log.
Each entry shows: timestamp, direction, topic name, and message payload.
Tips
- Subscribe to topics before publishing to see your own messages
- Use
#wildcard to monitor all messages on a broker: subscribe to# - QoS 0 is fastest but messages may be lost; QoS 2 is slowest but guaranteed
- The retain flag is useful for "last will" messages โ new subscribers get the latest value immediately
- Most public test brokers:
mqtt://test.mosquitto.org,mqtt://broker.hivemq.com