title: Apache Camel - Quartz2 with mybatis using onConsume
body: <p>My Camel:</p>
  
  <pre><code>&lt;from uri="quartz2://processTimers?cron=5+*+*+*+*+*" /&gt;
  &lt;to uri="mybatis:selectProducts?statementType=SelectList&amp;amp;onConsume=consumeProduct"/&gt;
  &lt;bean ref="productService" method="process" /&gt;
  &lt;to uri="mq:queue:my.queue"/&gt;
  </code></pre>
  
  <p>When using a Quartz from, the selectProducts returns the expected results but the onConsume for some doesnt execute at the end, I suspect this is because its a "to" and not a "from" method.</p>
  
  <p>Is there anyway to have a cron scheduled mybatis select with an onConsume?</p>
  
  <p>Updated:</p>
  
  <pre><code>&lt;from uri="mybatis:selectProducts?statementType=SelectList&amp;amp;onConsume=markProductAsExtracted&amp;amp;maxMessagesPerPoll={{MAX_RECORDS_PER_PROCESS}}&amp;amp;scheduler=quartz2&amp;amp;scheduler.cron=5+*+*+*+*+?"/&gt;
  &lt;bean ref="productService" method="process" /&gt;
  &lt;to uri="mq:queue:my.queue"/&gt;
  </code></pre>