title: Do not commit offset when exception is thrown in camel-kafka
body: <p>I am using camel-kafka component. We have to follow strict ordering and we can not afford message loss. Thus in the case of some exception, we do not want to commit the offset. I have set <strong>autoCommitEnable=false</strong> and not handling the exception. BUT no matter which exception is thrown offset is getting committed (Only the stacktrace gets printed.) </p>
  
  <p>To handler this scenario , I changed the source code in camel-kafka. Here is the snippet:</p>
  
  <pre><code> try {
          KafkaConsumer.this.processor.process(exchange);
          if (KafkaConsumer.this.endpoint.getConfiguration().isAutoCommitEnable() != null
                  &amp;&amp; !KafkaConsumer.this.endpoint.getConfiguration().isAutoCommitEnable()
                          .booleanValue()) {
              this.consumer.commitSync(Collections.singletonMap(partition,
                      new OffsetAndMetadata(record.offset() + 1L)));
  // Commit one by one
          }
      } catch (Exception arg13) {
          KafkaConsumer.this.getExceptionHandler().handleException("Error during processing",
                  exchange, arg13);
          if (KafkaConsumer.LOG.isTraceEnabled()) {
              KafkaConsumer.LOG.trace(
                      "Caught an exception while processing partition {}, Kafka message (offset = {}) ",
                      Integer.valueOf(record.partition()), Long.valueOf(record.offset()));
          }
          break; // Break in case of any exception 
      }
  </code></pre>
  
  <p>BUT here also no luck. Even if I write handler or not, flow does not come in Catch block. Thus offset is always getting commiitted. is it the normal behavior ? How can I stop camel to commit offset in case of exception ?</p>
  
  <p>I can see there is property in spring-kakfa <strong>"ackOnError"</strong>. Do we have similar property in camel-kafka (I was not able to find any)? Please help.</p>