JMS + Fault

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

JMS + Fault

Markus Wolf
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

still trying to handle exceptions and error the way I want them. :)
I tried to return an exception to the jms message producer, but that
does not work the way a want to, because of the dead letter handler.
Therefore I tried to set the exception as fault body, but this results
in a exchange timeout exception on the client side. Both sides are using
camel with activemq.
Does the camel jms part support fault bodies? Or do I have to set the
out body and handle the errors on the client side?

Thanks
Markus Wolf
- --
NMMN - New Media Markets & Networks GmbH
Geschäftsführung: Kfm. Michael Schütt
Finanzamt HH-Altona UStID DE 812 699 852  HRB 71102 Hamburg
HypoVereinsbank  -   BLZ 200 300 00  -  Konto-Nr. 156 29 82

http://www.nmmn.com               Tel.: +49 40 284 118 -0
Langbehnstrasse 6                 Entwicklung:         -720
22761 Hamburg                     Fax:                 -999

Rufen Sie uns kostenlos an: http://www.nmmn.com/call/software

+++ Hausmesse am 14.11.2008 von 10:00 bis 16:00 Uhr +++
Überzeugen Sie sich auf unserer Hausmesse von unseren Produkten und
Dienstleistungen! Weitere Informationen und Anmeldung unter:
http://www.nmmn.com/hausmesse/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFI5MHSDBHISU1oEKERAgiJAKC8Asg6z0a3/TxpkkEpPlpKF8FfTwCeJpVE
nHsPPoMb9u4L2CowI1mIcng=
=M2MP
-----END PGP SIGNATURE-----
Reply | Threaded
Open this post in threaded view
|

Re: JMS + Fault

Markus Wolf
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

is there a way to signal the dead letter handler that an error has been
processed by a custom processor?

We have a route like this:

exception(SomeException.class).beanRef("SomeProcessor");
from("jms:queue...").beanRef("OtherProcessor");

When there is an exception in 'OtherProcessor' the dead channel is
triggered to handle the error or redeliver it. Our 'SomeProcessor' bean
is called then and does some error handling and setting the exchanges
exception to null.
Afterwards the jms EndpointMessageListener throws an exception and does
not write back our out-Message to the reply-to queue. But we need to
send a response back even in case of an exception. Is there a way to do so?

Thanks for any help
Markus Wolf
- --
NMMN - New Media Markets & Networks GmbH
Geschäftsführung: Kfm. Michael Schütt
Finanzamt HH-Altona UStID DE 812 699 852  HRB 71102 Hamburg
HypoVereinsbank  -   BLZ 200 300 00  -  Konto-Nr. 156 29 82

http://www.nmmn.com               Tel.: +49 40 284 118 -0
Langbehnstrasse 6                 Entwicklung:         -720
22761 Hamburg                     Fax:                 -999

Rufen Sie uns kostenlos an: http://www.nmmn.com/call/software

+++ Hausmesse am 14.11.2008 von 10:00 bis 16:00 Uhr +++
Überzeugen Sie sich auf unserer Hausmesse von unseren Produkten und
Dienstleistungen! Weitere Informationen und Anmeldung unter:
http://www.nmmn.com/hausmesse/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFI5OVmDBHISU1oEKERAopNAKDL5WSAd6ESzJZCiRP2FDXsMxNhHQCfaTpB
Sng04tyTi+z0OvCEfQzzuLM=
=4WgF
-----END PGP SIGNATURE-----
Reply | Threaded
Open this post in threaded view
|

RE: JMS + Fault

Claus Ibsen
Hi

Just for a poor answer check this thread:
http://www.nabble.com/ErrorHandler-%2B-DeadLetter-td19776054s22882.html

However no so elegant when you are doing the try .. catch yourself. But then
for sure you are in control.

> is there a way to signal the dead letter handler that an error has been
> processed by a custom processor?
See isFailureHandlded in the DeadLetterChannel, however it's not a public API.

But I guess there should be somekind of API for this and/or customization of the DeadLetterChannel to be configured to set/not set the original caused exception. As your point our that its okay you handed the exception so the route should continue, without indicating the exception.

Currently the DLC restores the original exception:
restoreExceptionOnExchange(exchange);

And this is the one we should configure.

Can you provide a small unit test demonstrating this, then we can use this as a base for the improvement in camel. Please feel free to create a JIRA ticket for it and attach your source there.




Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk

-----Original Message-----
From: Markus Wolf [mailto:[hidden email]]
Sent: 2. oktober 2008 17:15
To: [hidden email]
Subject: Re: JMS + Fault

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

is there a way to signal the dead letter handler that an error has been
processed by a custom processor?

We have a route like this:

exception(SomeException.class).beanRef("SomeProcessor");
from("jms:queue...").beanRef("OtherProcessor");

When there is an exception in 'OtherProcessor' the dead channel is
triggered to handle the error or redeliver it. Our 'SomeProcessor' bean
is called then and does some error handling and setting the exchanges
exception to null.
Afterwards the jms EndpointMessageListener throws an exception and does
not write back our out-Message to the reply-to queue. But we need to
send a response back even in case of an exception. Is there a way to do so?

Thanks for any help
Markus Wolf
- --
NMMN - New Media Markets & Networks GmbH
Geschäftsführung: Kfm. Michael Schütt
Finanzamt HH-Altona UStID DE 812 699 852  HRB 71102 Hamburg
HypoVereinsbank  -   BLZ 200 300 00  -  Konto-Nr. 156 29 82

http://www.nmmn.com               Tel.: +49 40 284 118 -0
Langbehnstrasse 6                 Entwicklung:         -720
22761 Hamburg                     Fax:                 -999

Rufen Sie uns kostenlos an: http://www.nmmn.com/call/software

+++ Hausmesse am 14.11.2008 von 10:00 bis 16:00 Uhr +++
Überzeugen Sie sich auf unserer Hausmesse von unseren Produkten und
Dienstleistungen! Weitere Informationen und Anmeldung unter:
http://www.nmmn.com/hausmesse/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFI5OVmDBHISU1oEKERAopNAKDL5WSAd6ESzJZCiRP2FDXsMxNhHQCfaTpB
Sng04tyTi+z0OvCEfQzzuLM=
=4WgF
-----END PGP SIGNATURE-----
Reply | Threaded
Open this post in threaded view
|

RE: JMS + Fault

Claus Ibsen
Hi

I have created a ticket for this:
https://issues.apache.org/activemq/browse/CAMEL-960

Please if you have any thoughts etc. then add it to the ticket.
I am considering pushing this for 1.5 but we should also start pushing for closing 1.5. So if it should be in 1.5 then use the votes or +1 etc.


Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk

-----Original Message-----
From: Claus Ibsen [mailto:[hidden email]]
Sent: 2. oktober 2008 18:21
To: [hidden email]
Subject: RE: JMS + Fault

Hi

Just for a poor answer check this thread:
http://www.nabble.com/ErrorHandler-%2B-DeadLetter-td19776054s22882.html

However no so elegant when you are doing the try .. catch yourself. But then
for sure you are in control.

> is there a way to signal the dead letter handler that an error has been
> processed by a custom processor?
See isFailureHandlded in the DeadLetterChannel, however it's not a public API.

But I guess there should be somekind of API for this and/or customization of the DeadLetterChannel to be configured to set/not set the original caused exception. As your point our that its okay you handed the exception so the route should continue, without indicating the exception.

Currently the DLC restores the original exception:
restoreExceptionOnExchange(exchange);

And this is the one we should configure.

Can you provide a small unit test demonstrating this, then we can use this as a base for the improvement in camel. Please feel free to create a JIRA ticket for it and attach your source there.




Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk

-----Original Message-----
From: Markus Wolf [mailto:[hidden email]]
Sent: 2. oktober 2008 17:15
To: [hidden email]
Subject: Re: JMS + Fault

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

is there a way to signal the dead letter handler that an error has been
processed by a custom processor?

We have a route like this:

exception(SomeException.class).beanRef("SomeProcessor");
from("jms:queue...").beanRef("OtherProcessor");

When there is an exception in 'OtherProcessor' the dead channel is
triggered to handle the error or redeliver it. Our 'SomeProcessor' bean
is called then and does some error handling and setting the exchanges
exception to null.
Afterwards the jms EndpointMessageListener throws an exception and does
not write back our out-Message to the reply-to queue. But we need to
send a response back even in case of an exception. Is there a way to do so?

Thanks for any help
Markus Wolf
- --
NMMN - New Media Markets & Networks GmbH
Geschäftsführung: Kfm. Michael Schütt
Finanzamt HH-Altona UStID DE 812 699 852  HRB 71102 Hamburg
HypoVereinsbank  -   BLZ 200 300 00  -  Konto-Nr. 156 29 82

http://www.nmmn.com               Tel.: +49 40 284 118 -0
Langbehnstrasse 6                 Entwicklung:         -720
22761 Hamburg                     Fax:                 -999

Rufen Sie uns kostenlos an: http://www.nmmn.com/call/software

+++ Hausmesse am 14.11.2008 von 10:00 bis 16:00 Uhr +++
Überzeugen Sie sich auf unserer Hausmesse von unseren Produkten und
Dienstleistungen! Weitere Informationen und Anmeldung unter:
http://www.nmmn.com/hausmesse/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFI5OVmDBHISU1oEKERAopNAKDL5WSAd6ESzJZCiRP2FDXsMxNhHQCfaTpB
Sng04tyTi+z0OvCEfQzzuLM=
=4WgF
-----END PGP SIGNATURE-----