}
private boolean isExchangeInUse(String broker, Exchange exchange) {
BrokerSpy spy = new BrokerSpy(broker);
try {
spy.jmxConnectServer();
Map<String, String> map = spy.getExchangeAttribMap(exchange);
if(map.isEmpty())
return false;
else if(Long.valueOf(map.get("NumMsgs")) > 0)
return true;