I am refactoring legacy project and in which i have to read table which has
some meta data on the base of it i have to start activemq listeners.
Now i want to read this tables only once at the start of application how i
can make sure that jpa consumer just get called once
from("jpa:my.imran.TopicMapping"
+
"?consumer.namedQuery=select_topic_mapping&delay=5s&consumeDelete=false")
.to("log:my?showAll=true&multiline=true");
I know we can use @consume but in my scenario it will not work as if i have
to restart application it should re read these records from table.
So how we can make sure to call JPA consumer only once in lifecycle of
application.