-
Notifications
You must be signed in to change notification settings - Fork 68
ScriptingSubscriptions
Kamil Baczkowicz edited this page Aug 5, 2016
·
3 revisions
To run a script for a given subscription, go to the connection settings (Menu -> Connections -> Connection settings / Ctrl + M), select your connection, then go to the Subscriptions tab and add a new entry with the subscription filter/topic and the location of the script. Then open the connection and your script should be run automatically.
function onMessage()
{
mqtt.publish(
"/reply", "<simpleReply><topic>" + receivedMessage.getTopic() + "</topic>"
+ "<payload><![CDATA[" + receivedMessage.getPayload() + "]]></payload>"
+ "</simpleReply>", 0, false);
return true;
}
function onMessage()
{
receivedMessage.setPayload("<tag>" + receivedMessage.getPayload() + "- modified :)</tag>");
return true;
}
The project is being moved to Eclipse Paho - please use the new GitHub repo at https://github.com/eclipse/paho.mqtt-spy. Don't forget to star it too! This repo will only be kept as an archive/reference.
mqtt-spy
- Getting started
- Overview
- Changelog
- Message search
- Charts
- Configuration
- Logging
- Dependencies
- Downloads
mqtt-spy-daemon
mqtt-spy & mqtt-spy-daemon