You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Oleg Atamanenko <da...@gmail.com> on 2008/07/21 07:47:49 UTC

Error Handling and custom routing

Hello everybody.

I have the following question: I want to configure custom process of message
processing.
 I have about 10 components, each of them does some work with message. Every
component can throw exception.
Is it possible configure to route exception to some custom component for
further processing?

I need to save some information from exception, log it somewhere, create
record in database, notify...
I.e. I want to reroute message to some component, if exception is occured.

How can I do it with ServiceMix?


Best Regards,
    Oleg Atamanenko.

Re: Error Handling and custom routing

Posted by Gert Vanthienen <ge...@skynet.be>.
Oleg Atamanenko,

The easiest way to do this is by using Camel for doing routing and mediation
inside the JBI container.  Have a look at
http://servicemix.apache.org/servicemix-camel.html and
http://servicemix.apache.org/3-beginner-using-apache-camel-inside-servicemix.html
for more information on using this component inside ServiceMix.

Camel has support for error handlers
http://activemq.apache.org/camel/error-handler.html -- especially the
http://activemq.apache.org/camel/dead-letter-channel.html has many
configuration options that make it very useful and flexible.

Gert


Bugzilla from dark.schakal@gmail.com wrote:
> 
> Hello everybody.
> 
> I have the following question: I want to configure custom process of
> message
> processing.
>  I have about 10 components, each of them does some work with message.
> Every
> component can throw exception.
> Is it possible configure to route exception to some custom component for
> further processing?
> 
> I need to save some information from exception, log it somewhere, create
> record in database, notify...
> I.e. I want to reroute message to some component, if exception is occured.
> 
> How can I do it with ServiceMix?
> 
> 
> Best Regards,
>     Oleg Atamanenko.
> 
> 


-----
---
Gert Vanthienen
http://www.anova.be
-- 
View this message in context: http://www.nabble.com/Error-Handling-and-custom-routing-tp18562536p18564446.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Error Handling and custom routing

Posted by Manuel EVENO <ma...@gmail.com>.
You can use deadLetterChannel().setDefaultDeadLetterEndpoint(endpoint or
processor);
This endpoint or porcessor will be invoked after Camel RedeliveryPolicy.

Manuel

On Mon, Jul 21, 2008 at 7:47 AM, Oleg Atamanenko <da...@gmail.com>wrote:

> Hello everybody.
>
> I have the following question: I want to configure custom process of
> message
> processing.
>  I have about 10 components, each of them does some work with message.
> Every
> component can throw exception.
> Is it possible configure to route exception to some custom component for
> further processing?
>
> I need to save some information from exception, log it somewhere, create
> record in database, notify...
> I.e. I want to reroute message to some component, if exception is occured.
>
> How can I do it with ServiceMix?
>
>
> Best Regards,
>     Oleg Atamanenko.
>