class JMSMessageConsumer {

  void commit() {
    try {
      session.commit();
    } catch (JMSException jmsException) {
      logger.warn("JMS Exception processing commit", jmsException);
    } catch (RuntimeException runtimeException) {
      logger.warn("Runtime Exception processing commit", runtimeException);
    }
  }

    JMSMessageConsumer(InitialContext initialContext, ConnectionFactory connectionFactory,
                     String destinationName, JMSDestinationLocator destinationLocator,
                     JMSDestinationType destinationType, String messageSelector, int batchSize,
                     long pollTimeout, JMSMessageConverter messageConverter,
                     Optional<String> userName, Optional<String> password,
                     Optional<String> clientId, boolean createDurableSubscription,
                     String durableSubscriptionName);

}