getLog().debug("Retrieving Topic");
Topic topic = (Topic) context.lookup(TEST_DURABLE_TOPIC);
getLog().debug("Creating a send session");
TopicSession sendSession = topicConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
TopicPublisher sender = sendSession.createPublisher(topic);
getLog().debug("Clearing the topic");
TopicSession subSession = topicConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
TopicSubscriber subscriber = subSession.createDurableSubscriber(topic, "test");
TextMessage message = (TextMessage) subscriber.receive(50);