Hi,
did you tried to use sql component?
http://camel.apache.org/sql-component.html
Regards
Fradj

2015-05-07 15:08 GMT+01:00 Mansour Al Akeel <[email protected]>:

> Usually I do this in plain java without using camel, however, I would
> like to start using camel for similar tasks.
>
> I need to use stateful job t opreserve state and variable for last
> run. One of these variable is the ID for the last record that was
> processed. I have seen that some developers mark a field with "DONE"
> in the originating table. However this is not possible as we don't
> have write permission to the originating table. And we can not read
> all the records, because the table may get big.
>
>
>
> So here's what I want to do:
>
> // poll the table every 5 seconds
>
> // if any new resords added or update_timestamp changed, then select
> those new records
>
> // use Message Enricher to get the new data from the DB. Iterate over them.
>
> // Send each updated record to message queue to be indexed by lucene
> or JDBC endpoint to be inserted into the target table.
>
> // store the last_id or timestamp for the processed recored to be used
> in the next run.
>
> A similar functionaity, I may need soon to poll CIMS sharepoint, where
> I don't have write access in the originating DB.
>
> I was not able to locate any example for using quartz2 stateful job.
>
> Any advice or pointer ?
>
> Thank you
>

Reply via email to