public ConnectionConsumer createDurableConnectionConsumer(Topic topic,
String subscriptionName, String messageSelector,
ServerSessionPool sessionPool, int maxMessages) throws JMSException {
checkClosed();
ensureClientIDInitialised();
ConsumerInfo info = new ConsumerInfo();
info.setConsumerId(this.handleIdGenerator.generateId());
info.setDestination(ActiveMQMessageTransformation
.transformDestination(topic));
info.setSelector(messageSelector);
info.setConsumerName(subscriptionName);
info.setConsumerNo(handleIdGenerator.getNextShortSequence());
return new ActiveMQConnectionConsumer(this, sessionPool, info,
maxMessages);
}