Host Examples

For Broker running on localhost

send an S1F3 to the tool for svid 33008

mosquitto_pub -h localhost -t "gemhost/svidrequest/svid" -m "33008"
mosquitto_pub -h localhost -t "gemhost/svidrequest/sendmessage" -m "1"

subscribe to the value list in the S1F4 reply

mosquitto_sub -h localhost -t "gemhost/svidresponse/svidlist"

Remote Broker

To start the MQTT Server using a remote (not localhost) broker do this:

java -DMQTTBroker=ipaddress deploy.XXXXXX.EquipmentController

where ipaddress is the location of the broker (for example, 192.168.5.150)

the -h command on the subscribe and publish will be -h 192.168.5.150

for example:

mosquitto_sub -h 192.168.5.150 -t "gemhost/svidresponse/svidlist" 
{ "values": [] }
mosquitto_pub -h 192.168.5.150 -t "gemhost/svidrequest/svid" -m "33008"
mosquitto_pub -h 192.168.5.150 -t "gemhost/svidrequest/sendmessage" -m "1"

results in a value appearing in the subscription for svidlist:

mosquitto_sub -h 192.168.5.150 -t "gemhost/svidresponse/svidlist" 
{ "values": [] } 
{ "values": [ "2019031221054472" ] , type:"20 }

MQTT Downside

MQTT has no built in way to indicate data quality.