ClientSessionDelegate clientSessionDelegate = (ClientSessionDelegate) session.getDelegate();
SessionState sessionState = (SessionState) clientSessionDelegate.getState();
MessageConsumer consumerHA = session.createDurableSubscriber((Topic) destination, "T1");
MessageProducer producer = session.createProducer(destination);
Message message = session.createTextMessage("Hello Before");
producer.send(message);
session.commit();
receiveMessage("consumerHA", consumerHA, true, false);