queue.add(connection.publish(topic, new AsciiBuffer("SHUTDOWN"), QoS.AT_LEAST_ONCE, false));
while( !queue.isEmpty() ) {
queue.removeFirst().await();
}
connection.disconnect().await();
System.exit(0);
}
private static String env(String key, String defaultValue) {