Fixing the mqtt java example a bit.

This commit is contained in:
Hiram Chirino 2013-10-10 11:32:29 -04:00
parent a912d6d5ce
commit 6773b8ff76
2 changed files with 4 additions and 0 deletions

View File

@ -78,6 +78,7 @@ class Listener {
}
count ++;
}
ack.run();
}
});
connection.connect(new Callback<Void>() {

View File

@ -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));