class JmsPoolMessageConsumer implements MessageConsumer, AutoCloseable {

    @Override
    public void close() throws JMSException {
        // ensure session removes consumer from it's list of managed resources.
        if (closed.compareAndSet(false, true)) {
            session.onConsumerClose(messageConsumer);
            messageConsumer.close();
        }
    }

      JmsPoolMessageConsumer(JmsPoolSession session, MessageConsumer messageConsumer);

}