Hello,
I need some help with an integration involving SQL batch processing and
aggregation.  The integration will be executed on demand by an end user. It
will retrieve line items from a database, aggregate the line items by ticket
nbr, and publish each ticket to web service.  After the ticket is published
to the webservice, I need to mark all line items for that ticket as
published in the database. 

Here is what I have so far:

from("direct:start").routeId("Publish Data")

.to("sql:classpath:sql/SelectTicketInfo.sql?dataSource=dataSource").split(body())
                       
        .to("log:ticket").setHeader("ticket_number",
simple("${body.get(TKT_NUM)}"))
        .aggregate(header("ticket_number"), new
TicketAgg()).completionFromBatchConsumer()
        .to("log:aggregateInfo")
                                
        .process(new Processor() {
                public void process(Exchange ex) {

                        ex.getIn().setBody(new SalesOrderType().getClass());
                }
        })
                                
        .to(SUBSCRIBER_URI).to("log:subscriber");

The integration runs without errors, but the aggregation never completes. I
believe I need to make this a batch consumer where I can use the
completionFromBatchConsumer(). I am confused on how to make this happen.  

I have reviewed multiple examples on aggregation and looked through Camel In
Action. What am I missing?

Note: I am using Camel 2.17.2.



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

Reply via email to