final TopicSession session = topicDurableConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
Topic topic = (Topic)context.lookup(TEST_DURABLE_TOPIC);
TopicSubscriber subscriber = session.createDurableSubscriber(topic, "test");
Message message = subscriber.receive(1000);
int c = 0;
while (message != null)
{
message = subscriber.receive(1000);
c++;