brokerService.setDestinationPolicy(policyMap);
MQTT mqtt = createMQTTConnection("pub-sub", true);
final int[] retain = new int[1];
final int[] nonretain = new int[1];
mqtt.setTracer(new Tracer() {
@Override
public void onReceive(MQTTFrame frame) {
if (frame.messageType() == PUBLISH.TYPE) {
LOG.info("Received message with retain=" + frame.retain());
if (frame.retain()) {