The JDBC component shows the following example for basic change data capture:

from("timer://MoveNewCustomersEveryHour?period=3600000")
    .setBody(constant("select * from customer where create_time >
(sysdate-1/24)"))
    .to("jdbc:testdb")
    .to("kafka:mytopic?...)

I have an ID column in the database that I know the inserts are in
lexicographical order so that I can perform the equivalent of the
following to get the changes:

select * from customer where myID where myID > //lastID

How can I extract the maximum lastID sent to the kafka topic and save
that so that it can be used the next time the timer polls the
database?

My camel instance is not clustered, only a single instance will be running.

Many thanks,

Chris

Reply via email to