camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Persist messages body between different endpoints ?
Date Thu, 19 Feb 2009 16:38:54 GMT
On Thu, Feb 19, 2009 at 4:47 PM, cmoulliard <> wrote:
> Claus,
> Will the lock on the file removed when the process will reached the last
> step route - so in this case, when the messages will go to the queue : xx ?
> Can you confirm or infirm this ?
Yes the lock file is of course delete when the route completes

> Does it makes sense to design the route like this to avoid to lost messages
> and objects ?
> from("file=////").unmarshal().("activemq:queue:xx")
> from("activemq:queue:xx").to("bean=A").to("activemq:queue:xx")
> from("activemq:queue:xx").to("bean=B").to("activemq:queue:xx")
> from("activemq:queue:xx").to("bean=C").to("activemq:queue:xx")
Yeah that is fine, if eg bean A B or C is complex and prone to error,
and that they are not idempotent.

Otherwise it might be a bit overkill to introduce so many queues.

from(queue).to A, B, C to (queue)

might be fine.

And even the original one
from(file) A B C to queue

As the original is file based and does survive if the server crashes etc.

The key issue bean A B and C if they can be safely re run with the
same message, if eg. the server crashed at bean C
So you restart and the same message is re-read and proessed from start
again in A, B, and C.

> Regards,
> cmoulliard wrote:
>> Hi,
>> I would like to know if a persisting (like serialization of messages)
>> exist and can be activated easily between different endpoints ?
>> Let's see what I'm thinking about with an example
>> from("file=////").unmarshal().to("bean=A").to("bean=B").to("bean=C").to("activemq:queue:xx")
>> In this routing, the content of a file is unmarshaled and the objects
>> created will go to different endpoints (bean A, B and C) encapsulated in
>> the body of messages. If something occurs during the processing of the
>> messages, then the messages/objects will be lost (e.g. this situation can
>> occur in case of system crash, exception raised during process execution
>> inside a bean)
>> Is there a mechanism that we can use to persist java objects and restore
>> them in case of server crash or exception (like the mechanism that we have
>> in EJB, ...)
>> Regards
> -----
> Charles Moulliard
> SOA Architect
> My Blog :
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Apache Camel Committer

Open Source Integration:

View raw message