public void unsubscribe(String topic,boolean existing) throws Exception {
  logToFile("unsubscribe [topic:" + topic + "][existing:"+ existing+ "]");
  client.unsubscribe(topic);
  Object o=subscribedTopics.remove(topic);
  if (existing == (o == null)) {
    throw new Exception("Subscription state mismatch [topic:" + topic + "][expected:"+ existing+ "]");
  }
}

public void unsubscribe ( String topic , boolean existing ) throws Exception { logToFile ( "unsubscribe [topic:" + topic + "][existing:" + existing + "]" ) ; client . unsubscribe ( topic ) ; Object o = subscribedTopics . remove ( topic ) ; if ( existing == ( o == null ) ) { throw new Exception ( "Subscription state mismatch [topic:" + topic + "][expected:" + existing + "]" ) ; } }
unsubscribes the given topic
