You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Vince Iglehart <vi...@kniferiver.com> on 2016/07/27 22:41:21 UTC

SQL Batch Consumer

Hello, 
I have a route with batch consumer that I want to execute manually.  The
route will read information using a SQL statement, aggregate the result rows
by ticket_nbr, and force complete each aggregated group after all the rows
have been aggregated. Here is what I have so far:

from("sql:classpath:sql/SelectTicketInfo.sql?dataSource=ticketDataSource")
	.setHeader("ticket_number",
simple("${body.get(TICKET_NBR)}")).to("log:split")
	.aggregate(new SalesOrderAgg()).header("ticket_number")
	.completionFromBatchConsumer().forceCompletionOnStop()
to("log:moreprocessing");

To execute a route manually, I would normally start out with:
from("direct:poll").to("sql:.....")

However then I would not be able to use the completionFromBatchConsumer.

What am I missing?

I am using Camel 2.17.1.



--
View this message in context: http://camel.465427.n5.nabble.com/SQL-Batch-Consumer-tp5785512.html
Sent from the Camel - Users mailing list archive at Nabble.com.