sess.createDurableSubscriber(topic, subName);
MessageConsumer cons = sess.createDurableSubscriber(topic, subName); cons.close();
   private boolean canCreateDurableSub(Connection conn, Topic topic, String subName) throws Exception   {      Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);      try      {         sess.createDurableSubscriber(topic, subName);         sess.unsubscribe(subName);         log.trace("Successfully created and unsubscribed subscription");         return true;      }      catch (JMSSecurityException e)      {         log.trace("Can't create durable sub");         return false;      }   }