I have figured it out how to use @Consumed after reading the JpaConsumer
class in the camel source.


1) I have added processed field in the table with default 0, which will be
used to check if the record is processed or not.

2) added update method in the OldTableEntity and added @Consumed annotation.
See below

@Consumed
        public void updateProcessedFlag(){
                this.processed = 1;
        }

3) made a change  in routebuilder class as shown below
from("jpa:com.test.entity.OldTableEntity?consumer.query=select x from
OldTableEntity x where
x.processed=0&consumeDelete=false&delay=3000&consumeLockEntity=false") 

That is the only change I had to make to make use of @Consumed annotation to
update the flag.


-- 
View this message in context: 
http://old.nabble.com/%40Consumed-tp27026797p27038384.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to