gnodet wrote:
>
> Btw, I was wondering if a consumer could be implemented for JDBC too:
> an example would be a polling consumer that polls for rows in a given
> table
> and send a message for each new row (we need a strategy to determine if
> a row is new: it could be deleting processed rows or flagging them
> somehow)...
>
That was the use case I had before I started down this path. I believe I can
now do something like
from("timer:poller?period=10000").setBody("select * from table where
somecondition is
true").to("jdbc:myDatasource?readSize=1000").splitter(rowSplitter).process(myprocess);
Note..I still have to write a row splitter component but that should be easy
(substitute your own splitting process for now)
Now whats missing still above is deleting the processed rows ... that goes
back to being able to support onComplete or onError ... so once James and
Hiram stabilize their commits we should be able to wrap a transaction around
this and in the onComplete part of that do something like
setBody("delete from table where somecondition is
true").to("jdbc:myDatasource") or onError do something else
--
View this message in context:
http://www.nabble.com/Camel-JDBC-Component-tf4348358s22882.html#a12393157
Sent from the Camel - Development mailing list archive at Nabble.com.