Minor fix for Paho perf groovy scripts
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
|||||||
|
package org.eclipse.moquette.parser.netty.performance;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by andrea on 6/2/15.
|
||||||
|
*/
|
||||||
|
public class LoopHandler {
|
||||||
|
}
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
package org.eclipse.moquette.parser.netty.performance;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by andrea on 6/2/15.
|
||||||
|
*/
|
||||||
|
public class ProtocolDecodingServer {
|
||||||
|
}
|
||||||
@@ -25,7 +25,7 @@ MqttClient client = new MqttClient("tcp://${host}:1883", "PublisherClient", data
|
|||||||
//connOptions.password = 'password' as char[]
|
//connOptions.password = 'password' as char[]
|
||||||
//Only for Apollo ---
|
//Only for Apollo ---
|
||||||
//client.connect(connOptions)
|
//client.connect(connOptions)
|
||||||
client.connect(connOptions)
|
client.connect()
|
||||||
MqttMessage message = new MqttMessage('Hello world!!'.bytes)
|
MqttMessage message = new MqttMessage('Hello world!!'.bytes)
|
||||||
message.setQos(0)
|
message.setQos(0)
|
||||||
print "publishing..${numToSend} messages, "
|
print "publishing..${numToSend} messages, "
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ class SubscriberCallback implements MqttCallback {
|
|||||||
long spentTime = stopTime - m_startTime
|
long spentTime = stopTime - m_startTime
|
||||||
println "/exit received"
|
println "/exit received"
|
||||||
println "subscriber disconnected, received ${m_numReceived} messages in ${spentTime} ms"
|
println "subscriber disconnected, received ${m_numReceived} messages in ${spentTime} ms"
|
||||||
client.disconnect()
|
|
||||||
m_latch.countDown()
|
m_latch.countDown()
|
||||||
} else {
|
} else {
|
||||||
//println "-received ${message} on ${topic} with QoS ${message.qos}"
|
//println "-received ${message} on ${topic} with QoS ${message.qos}"
|
||||||
@@ -79,3 +78,4 @@ client.subscribe("/exit", 0)
|
|||||||
println "subscribed to /exit"
|
println "subscribed to /exit"
|
||||||
|
|
||||||
callback.waitFinish()
|
callback.waitFinish()
|
||||||
|
client.diconnect()
|
||||||
|
|||||||
Reference in New Issue
Block a user