title: How to prevent message commit after caught the exception in client-acknowledge mode in camel
body: <p>Now I have a program to listen a jms queue, and it use client-acknowledge mode to commit transaction after the program consumed the message without exception.</p>
  
  <pre><code>public void process(Exchange exch) throws Exception {
          JmsMessage message = (JmsMessage) exch.getIn();
          try {
              ...
              javax.jms.Message msg = message.getJmsMessage();
              log.info("commit ems level transaction");
              msg.acknowledge();
          } catch (Exception e) {
              ...
          }
      }
  </code></pre>
  
  <pre><code>&lt;camelContext id="JMS_MCI" xmlns="http://camel.apache.org/schema/spring"&gt;
          &lt;endpoint id="commonJmsMciInQue" uri="QUEUE"&gt;
              &lt;property key="testConnectionOnStartup" value="true" /&gt;
              &lt;property key="disableReplyTo" value="true" /&gt;
              &lt;property key="concurrentConsumers" value="10" /&gt;
              &lt;property key="acknowledgementModeName" value="CLIENT_ACKNOWLEDGE" /&gt;
          &lt;/endpoint&gt;
  &lt;/camelContext&gt;
  </code></pre>
  
  <p>And I try to set breakpoint on my program, when it caught exception, in case the exception handling code has not finished executing, the message is still exist in the queue, once the exception handling code has finished executing, the message is deleted.</p>
  
  <p>So how to stop the message commit when it caught the ecxeption?</p>
  
  <p>Thanks for you help!~~</p>