You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "zhichao.fei@hpe.com" <zh...@hpe.com> on 2015/09/14 09:09:08 UTC
How can I manually redelivery the message to source endpoint while
an exception throws?
Hi All,
As we known, Camel has auto redelivery machanism, but sometimes, we need
re-delivery the message to source endpoint while delivery faild. Nomally, we
need to process below steps.
1. While an exception throws, we will save the Exchange/Message to the
database.
2. Provide a page to modify the Exchange/Message then click a button to
re-delivery the message.
How can I implement this scenario.
I appreciate if someone can provide good idea.
Zhi-Chao Fei
--
View this message in context: http://camel.465427.n5.nabble.com/How-can-I-manually-redelivery-the-message-to-source-endpoint-while-an-exception-throws-tp5771486.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: How can I manually redelivery the message to source endpoint
while an exception throws?
Posted by "zhichao.fei@hpe.com" <zh...@hpe.com>.
Hi Greg,
I appreciate your quickly response.
I know Camel has OnException to catch the exception, as well as the auto
re-delivery mechanism. But in some case, user hope they can manually to
resubmit the message.
For example, if the exception throws, we need serialize Message/Exchange
object as String and save it to database. Then user can correct the
message/exchange then deserialize the String as Message/Exchange object and
resubmit it.
Do you have any good solution for this scenario? If you can provide some
code example, I really appreciate.
Zhi-Chao Fei
--
View this message in context: http://camel.465427.n5.nabble.com/How-can-I-manually-redelivery-the-message-to-source-endpoint-while-an-exception-throws-tp5771486p5771509.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: How can I manually redelivery the message to source endpoint
while an exception throws?
Posted by Greg Autric <ga...@redhat.com>.
Hi Zhi-Chao Fei,
You can catch exception via OnException mechanism
http://camel.apache.org/exception-clause.html
If you can reply everything you want to the client (HTTP)
feel free to send your sample if needed
Greg AUTRIC
JBoss Middleware Consultant
email : gautric __at__ redhat __dot__ com
twitter : @gautric_io
Red Hat Global Services
Red Hat France SARL sit: http://www.redhat.fr
Le Linea, 1 rue du General Leclerc, 92047 Paris La Défense Cedex
Sent from webmail
----- Mail original -----
De: "zhichao fei" <zh...@hpe.com>
À: users@camel.apache.org
Envoyé: Lundi 14 Septembre 2015 09:09:08
Objet: How can I manually redelivery the message to source endpoint while an exception throws?
Hi All,
As we known, Camel has auto redelivery machanism, but sometimes, we need
re-delivery the message to source endpoint while delivery faild. Nomally, we
need to process below steps.
1. While an exception throws, we will save the Exchange/Message to the
database.
2. Provide a page to modify the Exchange/Message then click a button to
re-delivery the message.
How can I implement this scenario.
I appreciate if someone can provide good idea.
Zhi-Chao Fei
--
View this message in context: http://camel.465427.n5.nabble.com/How-can-I-manually-redelivery-the-message-to-source-endpoint-while-an-exception-throws-tp5771486.html
Sent from the Camel - Users mailing list archive at Nabble.com.