mirror of https://github.com/apache/activemq.git
Fixing the mqtt java example a bit.
This commit is contained in:
parent
a912d6d5ce
commit
6773b8ff76
|
@ -78,6 +78,7 @@ class Listener {
|
|||
}
|
||||
count ++;
|
||||
}
|
||||
ack.run();
|
||||
}
|
||||
});
|
||||
connection.connect(new Callback<Void>() {
|
||||
|
|
|
@ -71,6 +71,9 @@ class Publisher {
|
|||
queue.removeFirst().await();
|
||||
}
|
||||
|
||||
if( i % 1000 == 0 ) {
|
||||
System.out.println(String.format("Sent %d messages.", i));
|
||||
}
|
||||
}
|
||||
|
||||
queue.add(connection.publish(topic, new AsciiBuffer("SHUTDOWN"), QoS.AT_LEAST_ONCE, false));
|
||||
|
|
Loading…
Reference in New Issue