I want to do something like this:

from("activemq:start)
   .transacted()
   .aggregate(new PMCAggregationStrategy())
   .constant(true) // aggregate everything into one message
   .completionPredicate(header(FINISH_AGGREGATION).isEqualTo(true))
   .to("mock:end");

Since aggregation can take long time, I want to make sure no messages
are lost on Camel restart. But it seems that it's losing messages that
are currently being aggregated. Where does transaction end for multiple
messages being aggregated like this ? Does each have it's own
transaction and the transaction is somehow saved along the route ?

Persistence works fine for routes that don't have aggregation. 
For example :

from("activemq:worksfine)
   .transacted()
   .process(..)
   .delay(...)
   .to("mock:end");

In this case, on Camel restart, the messages will be picked from
ActiveMQ and re-processed.





-- 
Dragisa Krsmanovic
Java Developer
Public Library of Science 
http://www.plos.org


--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This email is confidential to the intended recipient. If you have received it 
in error, please notify the sender and delete it from your system. Any 
unauthorized use, disclosure or copying is not permitted. The views or opinions 
presented are solely those of the sender and do not necessarily represent those 
of Public Library of Science unless otherwise specifically stated. Please note 
that neither Public Library of Science nor any of its agents accept any 
responsibility for any viruses that may be contained in this e-mail or its 
attachments and it is your responsibility to scan the e-mail and attachments 
(if any).

Reply via email to