Re: Persist messages body between different endpoints ?
On Wed, Feb 18, 2009 at 3:26 PM, cmoulliard cmoulli...@gmail.com 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, ...) Use persistence JMS queues. Then its the brokers job to not loose the messages. But you also have it as files and they survive server crashes :) So in your route if there is a crash in the processing in bean B then the original file is still there and when the server restarts it will read the file again. You might have to remove/cleanup some internmediate marker files that Camel leaves when it markes a file as being in progress The file is named .camelLock Regards - Charles Moulliard SOA Architect My Blog : http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/ -- View this message in context: http://www.nabble.com/Persist-messages-body-between-different-endpoints---tp22079859s22882p22079859.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/
Re: Persist messages body between different endpoints ?
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 ? 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) 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 : http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/ -- View this message in context: http://www.nabble.com/Persist-messages-body-between-different-endpoints---tp22079859s22882p22103322.html Sent from the Camel - Users mailing list archive at Nabble.com.
Persist messages body between different endpoints ?
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 : http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/ -- View this message in context: http://www.nabble.com/Persist-messages-body-between-different-endpoints---tp22079859s22882p22079859.html Sent from the Camel - Users mailing list archive at Nabble.com.