0

In my code I have a camel-sql consumer which runs on default consumer.delay=500 and Max msg per poll is 5.

Consumer is fetching data from Customer table with Join on Customer_status table (Customer.Cust_id = Customer_status.Cust_id where Customer_status.Cust_id IS NULL).

Idea of maintaining Customer_status is to maintain status of processed record and to make sure next batch doesn't have records from previous batch (as per join condition)

But during program run, some batches have records which were picked in earlier batches.

So I am looking for a approach which can help me maintain uniqueness in each batch. Because my approach is not 100% working.

Using Camel with Springboot DB: Oracle

gomzee
  • 103
  • 1
  • 9
  • The camel-sql component has functionality to perform a sql update after processing each row to mark it as processed, then you use that to avoid seleting the same row again on next poll. See the documentation. There is a little example here: https://github.com/apache/camel/tree/master/examples/camel-example-sql-blueprint – Claus Ibsen Feb 15 '19 at 07:33
  • Also does anyone has faced camel-sql consumer not closing the connection after route completes for each consume. Using Jprofiler I can see each connection to DB remains active. – gomzee Mar 15 '19 at 09:59

0 Answers0