try (JMSContext context = durableConnectionFactory.createContext();) {
context.stop();
consumer = context.createDurableConsumer(topic, "MakeItLast");
listener = new TextListener();
consumer.setMessageListener(listener);
context.start();
...