On Tue, May 20, 2008 at 10:46 PM, pratibhaG <[EMAIL PROTECTED]> wrote:
>
> Thanks Bruce,
>
> If I put this configuration
> public void configure() {
> from(SERVICE_IN).errorHandler(deadLetterChannel(ERROR_IN).maximumRedeliveries(0)).to(BEAN_IN);
> }
> instead of this
> public void configure() {
>        errorHandler(deadLetterChannel(ERROR_IN));
>           from(SERVICE_IN).to(BEAN_IN);
>        }
> then it works.
>
> I looked into wiretap pattern but I think it won't fulfill my requirements.
> What I want is if any error comes while delivering the message then that
> message should be sent to an error queue.

I suggested the use of the wiretap simply for debugging purposes. The
only way you're going to find your problem is to start debugging the
situation and one of the ways to do this is using a wiretap between
components.

> Cant we have something like this:
> 1)A kind of listener say errorListener which listen to each and every
> message which flow through NMR

This can be achieved using an ExchangeListener. I posted an example of
one that looks for errors on the message exchange:

http://cwiki.apache.org/SM/discussion-forums.html#nabble-f12050

Since you're writing the Java, you can do whatever you need.

> 2)If everything goes fine the message will be sent to its destination
> 3)If any error occurs the error will be analyzed to see what kind of error
> it is.
> a)If it is an error occurred because the destination application where the
> message was supposed to be sent is down, then the request message will be
> put in a queue say queue:requestpendingQueue. So that it can be processed
> later.
> b)Every application is up and and running. The message moves from source to
> destination safely. If the error occurred because the message content is not
> as expected (fault in message) by the destination, then the error message
> should be analyzed. If the destination for the message is say application1
> the the message should be sent to queue:application1.
> If the destination for the message is say application2 the the message
> should be sent to queue:application2

See the URL I posted above for an example of something that might help
you meet at least some of your needs.

Bruce
-- 
perl -e 'print unpack("u30","D0G)[EMAIL 
PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/

Reply via email to