Hi there,
I'm facing the following problem: I'd like to trigger a route by a message in a queue and then enrich it using a JPA consumer. According to the documentation I have,
<from uri="activemq:queue:q.in.trigger" id="from.trigger" />
<to uri="log:out1" id="to.log" />
<pollEnrich timeout="0"
uri="jpa://dummy.Event?consumer.query=select e from Event e" strategyRef="myAggregationStrategy" id="pollenrich.jpa" />
<to uri="log:out2" id="to.log2" />
The problem is since the JPA is by default running as a scheduled poll consumer it hits the database on its own rate instead of every time the message arrive to the queue.
I'm need this because I don't want to pull any data from the database before another route finish
My question is: how do I change this behavior so I can pull from the database on demand instead on a schedule?
I've already tried setting the timeout parameter to zero in the uri without luck, hope you can provide some ideas
Regards