Fixed the configuration of acl_file path

This commit is contained in:
andrea
2015-05-19 23:15:44 +02:00
parent 8b8058dc47
commit 302f3a96ce
5 changed files with 12 additions and 4 deletions
+5 -1
View File
@@ -8,6 +8,10 @@ import org.fusesource.mqtt.client.Topic
String host = args[0]
String topic = "/topic"
if (args.length > 1) {
topic = args[1]
}
//start a publisher
MQTT mqtt2 = new MQTT()
mqtt2.setHost(host, 1883)
@@ -15,7 +19,7 @@ BlockingConnection publisher = mqtt2.blockingConnection()
publisher.connect()
println "publisher connected"
publisher.publish("/topic", 'Hello world again!!'.bytes, QoS.AT_MOST_ONCE, false)
publisher.publish(topic, 'Hello world again!!'.bytes, QoS.AT_MOST_ONCE, false)
println "publisher published"
println "shutdown publisher"