ErrorHandler + DeadLetter

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

ErrorHandler + DeadLetter

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

Hi,

is it possible to create a route where some exceptions are handled by
the deadletter queue and some other just returned to the starting endpoint?
I've only found examples where all errors are handed over to the
deadletter endpoint.

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

iD8DBQFI5JL1DBHISU1oEKERAuslAJ4qFu6eOuQ5djLvAGl+O4Q6ZeljIwCfZTB9
Dts7tzgHG55GCZP8yEXjkV0=
=O8op
-----END PGP SIGNATURE-----
Reply | Threaded
Open this post in threaded view
|

RE: ErrorHandler + DeadLetter

Claus Ibsen
Hi

Yes I think you can using the ExceptionPolicyStrategy (se overriding default behaviour)
http://activemq.apache.org/camel/error-handler.html

You can either implement the logic in your own class (for really advanced stuff, or you need to be 100% in control what to do), or use the default behavior, that will look for the best matching exception route or fallback to the default error endpoint configured on the DeadLetterChannel.

The matching will look for: exception(TheExceptionClass.class) where you can customize the behaviour, e.g. setting a different retry and where to route it in case of redelivery failures.

exception(MyPolicyException.class)
        .maximumRedeliveries(1)
        .setHeader(MESSAGE_INFO, constant("Damm my policy exception"))
        .to(ERROR_QUEUE);


Notice that we will change exception to onException in Camel 1.5 as this is a better name for the DSL. It is in fact named onException in the Spring DSL.

So in your case you can do like this:

exception(MySpecialException.class)
        .maximumRedeliveries(0)
        .to("the endpoint URL that started it");

So when a MySpecialException is thrown its caught by the above configuration and routed to the ""the endpoint URL that started it". All other exceptions is handled by the default DeadLetterChannel.



We might need to clean up the wiki and add some better samples for this.

Could you try it and report back if it worked. Then we could use your use-case as a sample to add to the wiki


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 11:23
To: [hidden email]
Subject: ErrorHandler + DeadLetter

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

Hi,

is it possible to create a route where some exceptions are handled by
the deadletter queue and some other just returned to the starting endpoint?
I've only found examples where all errors are handed over to the
deadletter endpoint.

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

iD8DBQFI5JL1DBHISU1oEKERAuslAJ4qFu6eOuQ5djLvAGl+O4Q6ZeljIwCfZTB9
Dts7tzgHG55GCZP8yEXjkV0=
=O8op
-----END PGP SIGNATURE-----
Reply | Threaded
Open this post in threaded view
|

Re: ErrorHandler + DeadLetter

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

Hi Claus,

thanks for you help.
But no it does not work. The source endpoint is a jms queue and if I put
it back to that queue, then the processing starts again and result in an
endless loop.
What we require is an error handling where configured exceptions should
be set as fault or exception onto the out message and returned to the
sender (the process that initiated the jms message and which is waiting
for a response).

Any other idea?
Thanks
Markus

> Hi
>
> Yes I think you can using the ExceptionPolicyStrategy (se overriding default behaviour)
> http://activemq.apache.org/camel/error-handler.html
>
> You can either implement the logic in your own class (for really advanced stuff, or you need to be 100% in control what to do), or use the default behavior, that will look for the best matching exception route or fallback to the default error endpoint configured on the DeadLetterChannel.
>
> The matching will look for: exception(TheExceptionClass.class) where you can customize the behaviour, e.g. setting a different retry and where to route it in case of redelivery failures.
>
> exception(MyPolicyException.class)
>         .maximumRedeliveries(1)
>         .setHeader(MESSAGE_INFO, constant("Damm my policy exception"))
>         .to(ERROR_QUEUE);
>
>
> Notice that we will change exception to onException in Camel 1.5 as this is a better name for the DSL. It is in fact named onException in the Spring DSL.
>
> So in your case you can do like this:
>
> exception(MySpecialException.class)
>         .maximumRedeliveries(0)
>         .to("the endpoint URL that started it");
>
> So when a MySpecialException is thrown its caught by the above configuration and routed to the ""the endpoint URL that started it". All other exceptions is handled by the default DeadLetterChannel.
>
>
>
> We might need to clean up the wiki and add some better samples for this.
>
> Could you try it and report back if it worked. Then we could use your use-case as a sample to add to the wiki
>
>
> 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 11:23
> To: [hidden email]
> Subject: ErrorHandler + DeadLetter
>
> Hi,
>
> is it possible to create a route where some exceptions are handled by
> the deadletter queue and some other just returned to the starting endpoint?
> I've only found examples where all errors are handed over to the
> deadletter endpoint.
>
> 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

iD8DBQFI5Jr4DBHISU1oEKERAsp2AJ0cd1HFVf6JY2o2QP77QChDbOVwHwCgmZeC
+LuL4JpRQMDzTCqK3LWc8Yc=
=a48+
-----END PGP SIGNATURE-----
Reply | Threaded
Open this post in threaded view
|

RE: ErrorHandler + DeadLetter

Claus Ibsen
Hi

There is DSL for try ... catch .. kind of style.

But it is a very interesting use-case that I think should be easy to do in Camel.

James any thoughts?


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 11:57
To: [hidden email]
Subject: Re: ErrorHandler + DeadLetter

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

Hi Claus,

thanks for you help.
But no it does not work. The source endpoint is a jms queue and if I put
it back to that queue, then the processing starts again and result in an
endless loop.
What we require is an error handling where configured exceptions should
be set as fault or exception onto the out message and returned to the
sender (the process that initiated the jms message and which is waiting
for a response).

Any other idea?
Thanks
Markus

> Hi
>
> Yes I think you can using the ExceptionPolicyStrategy (se overriding default behaviour)
> http://activemq.apache.org/camel/error-handler.html
>
> You can either implement the logic in your own class (for really advanced stuff, or you need to be 100% in control what to do), or use the default behavior, that will look for the best matching exception route or fallback to the default error endpoint configured on the DeadLetterChannel.
>
> The matching will look for: exception(TheExceptionClass.class) where you can customize the behaviour, e.g. setting a different retry and where to route it in case of redelivery failures.
>
> exception(MyPolicyException.class)
>         .maximumRedeliveries(1)
>         .setHeader(MESSAGE_INFO, constant("Damm my policy exception"))
>         .to(ERROR_QUEUE);
>
>
> Notice that we will change exception to onException in Camel 1.5 as this is a better name for the DSL. It is in fact named onException in the Spring DSL.
>
> So in your case you can do like this:
>
> exception(MySpecialException.class)
>         .maximumRedeliveries(0)
>         .to("the endpoint URL that started it");
>
> So when a MySpecialException is thrown its caught by the above configuration and routed to the ""the endpoint URL that started it". All other exceptions is handled by the default DeadLetterChannel.
>
>
>
> We might need to clean up the wiki and add some better samples for this.
>
> Could you try it and report back if it worked. Then we could use your use-case as a sample to add to the wiki
>
>
> 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 11:23
> To: [hidden email]
> Subject: ErrorHandler + DeadLetter
>
> Hi,
>
> is it possible to create a route where some exceptions are handled by
> the deadletter queue and some other just returned to the starting endpoint?
> I've only found examples where all errors are handed over to the
> deadletter endpoint.
>
> 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

iD8DBQFI5Jr4DBHISU1oEKERAsp2AJ0cd1HFVf6JY2o2QP77QChDbOVwHwCgmZeC
+LuL4JpRQMDzTCqK3LWc8Yc=
=a48+
-----END PGP SIGNATURE-----
Reply | Threaded
Open this post in threaded view
|

RE: ErrorHandler + DeadLetter

Claus Ibsen
In reply to this post by Markus Wolf
Hi

You can always add a processor where you can do try .. catch and do the "routing" yourself.

From("jms:xxx").process(myProcessor)

From("direct:start").... do the original route

And then in myProcessor do


Try {
   ProducerTemplate template = exchange.getContext().createProducerTemplate();
   ...
   template.send("direct:start", exchange)
   template.stop();
} catch (Exception e) {
   // determine what to do
   if want to retry just rethrow
}


Beware with the template:
http://activemq.apache.org/camel/why-does-camel-use-too-many-threads-with-producertemplate.html


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 11:57
To: [hidden email]
Subject: Re: ErrorHandler + DeadLetter

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

Hi Claus,

thanks for you help.
But no it does not work. The source endpoint is a jms queue and if I put
it back to that queue, then the processing starts again and result in an
endless loop.
What we require is an error handling where configured exceptions should
be set as fault or exception onto the out message and returned to the
sender (the process that initiated the jms message and which is waiting
for a response).

Any other idea?
Thanks

Markus

> Hi
>
> Yes I think you can using the ExceptionPolicyStrategy (se overriding default behaviour)
> http://activemq.apache.org/camel/error-handler.html
>
> You can either implement the logic in your own class (for really advanced stuff, or you need to be 100% in control what to do), or use the default behavior, that will look for the best matching exception route or fallback to the default error endpoint configured on the DeadLetterChannel.
>
> The matching will look for: exception(TheExceptionClass.class) where you can customize the behaviour, e.g. setting a different retry and where to route it in case of redelivery failures.
>
> exception(MyPolicyException.class)
>         .maximumRedeliveries(1)
>         .setHeader(MESSAGE_INFO, constant("Damm my policy exception"))
>         .to(ERROR_QUEUE);
>
>
> Notice that we will change exception to onException in Camel 1.5 as this is a better name for the DSL. It is in fact named onException in the Spring DSL.
>
> So in your case you can do like this:
>
> exception(MySpecialException.class)
>         .maximumRedeliveries(0)
>         .to("the endpoint URL that started it");
>
> So when a MySpecialException is thrown its caught by the above configuration and routed to the ""the endpoint URL that started it". All other exceptions is handled by the default DeadLetterChannel.
>
>
>
> We might need to clean up the wiki and add some better samples for this.
>
> Could you try it and report back if it worked. Then we could use your use-case as a sample to add to the wiki
>
>
> 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 11:23
> To: [hidden email]
> Subject: ErrorHandler + DeadLetter
>
> Hi,
>
> is it possible to create a route where some exceptions are handled by
> the deadletter queue and some other just returned to the starting endpoint?
> I've only found examples where all errors are handed over to the
> deadletter endpoint.
>
> 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

iD8DBQFI5Jr4DBHISU1oEKERAsp2AJ0cd1HFVf6JY2o2QP77QChDbOVwHwCgmZeC
+LuL4JpRQMDzTCqK3LWc8Yc=
=a48+
-----END PGP SIGNATURE-----
Reply | Threaded
Open this post in threaded view
|

RE: ErrorHandler + DeadLetter

Claus Ibsen
In reply to this post by Markus Wolf
Hi Markus

Could you provide a small unit test that demonstrates what you want? And create a ticket in the JIRA so we don't forget about it.

Then we can try to get something fixed sooner than later.

You have an interesting use-case that would be cool to support easily in Camel. And we could write a cookbook wiki about this as well, so its easier for other users in similar situation as you.



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 11:57
To: [hidden email]
Subject: Re: ErrorHandler + DeadLetter

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

Hi Claus,

thanks for you help.
But no it does not work. The source endpoint is a jms queue and if I put
it back to that queue, then the processing starts again and result in an
endless loop.
What we require is an error handling where configured exceptions should
be set as fault or exception onto the out message and returned to the
sender (the process that initiated the jms message and which is waiting
for a response).

Any other idea?
Thanks
Markus

> Hi
>
> Yes I think you can using the ExceptionPolicyStrategy (se overriding default behaviour)
> http://activemq.apache.org/camel/error-handler.html
>
> You can either implement the logic in your own class (for really advanced stuff, or you need to be 100% in control what to do), or use the default behavior, that will look for the best matching exception route or fallback to the default error endpoint configured on the DeadLetterChannel.
>
> The matching will look for: exception(TheExceptionClass.class) where you can customize the behaviour, e.g. setting a different retry and where to route it in case of redelivery failures.
>
> exception(MyPolicyException.class)
>         .maximumRedeliveries(1)
>         .setHeader(MESSAGE_INFO, constant("Damm my policy exception"))
>         .to(ERROR_QUEUE);
>
>
> Notice that we will change exception to onException in Camel 1.5 as this is a better name for the DSL. It is in fact named onException in the Spring DSL.
>
> So in your case you can do like this:
>
> exception(MySpecialException.class)
>         .maximumRedeliveries(0)
>         .to("the endpoint URL that started it");
>
> So when a MySpecialException is thrown its caught by the above configuration and routed to the ""the endpoint URL that started it". All other exceptions is handled by the default DeadLetterChannel.
>
>
>
> We might need to clean up the wiki and add some better samples for this.
>
> Could you try it and report back if it worked. Then we could use your use-case as a sample to add to the wiki
>
>
> 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 11:23
> To: [hidden email]
> Subject: ErrorHandler + DeadLetter
>
> Hi,
>
> is it possible to create a route where some exceptions are handled by
> the deadletter queue and some other just returned to the starting endpoint?
> I've only found examples where all errors are handed over to the
> deadletter endpoint.
>
> 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

iD8DBQFI5Jr4DBHISU1oEKERAsp2AJ0cd1HFVf6JY2o2QP77QChDbOVwHwCgmZeC
+LuL4JpRQMDzTCqK3LWc8Yc=
=a48+
-----END PGP SIGNATURE-----
Reply | Threaded
Open this post in threaded view
|

Re: ErrorHandler + DeadLetter

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

Hi Claus,

I've created the ticket: https://issues.apache.org/activemq/browse/CAMEL-961
I've also attached a simple maven project but this does not really do
what we want, because it is not possible. :)
I've added some description how it was ment to be. If you have any
questions about it just ask me.

Thanks for your help
Markus Wolf

> Hi Markus
>
> Could you provide a small unit test that demonstrates what you want? And create a ticket in the JIRA so we don't forget about it.
>
> Then we can try to get something fixed sooner than later.
>
> You have an interesting use-case that would be cool to support easily in Camel. And we could write a cookbook wiki about this as well, so its easier for other users in similar situation as you.
>
>
>
> 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 11:57
> To: [hidden email]
> Subject: Re: ErrorHandler + DeadLetter
>
> Hi Claus,
>
> thanks for you help.
> But no it does not work. The source endpoint is a jms queue and if I put
> it back to that queue, then the processing starts again and result in an
> endless loop.
> What we require is an error handling where configured exceptions should
> be set as fault or exception onto the out message and returned to the
> sender (the process that initiated the jms message and which is waiting
> for a response).
>
> Any other idea?
> Thanks
> Markus
>
>> Hi
>
>> Yes I think you can using the ExceptionPolicyStrategy (se overriding default behaviour)
>> http://activemq.apache.org/camel/error-handler.html
>
>> You can either implement the logic in your own class (for really advanced stuff, or you need to be 100% in control what to do), or use the default behavior, that will look for the best matching exception route or fallback to the default error endpoint configured on the DeadLetterChannel.
>
>> The matching will look for: exception(TheExceptionClass.class) where you can customize the behaviour, e.g. setting a different retry and where to route it in case of redelivery failures.
>
>> exception(MyPolicyException.class)
>>         .maximumRedeliveries(1)
>>         .setHeader(MESSAGE_INFO, constant("Damm my policy exception"))
>>         .to(ERROR_QUEUE);
>
>
>> Notice that we will change exception to onException in Camel 1.5 as this is a better name for the DSL. It is in fact named onException in the Spring DSL.
>
>> So in your case you can do like this:
>
>> exception(MySpecialException.class)
>>         .maximumRedeliveries(0)
>>         .to("the endpoint URL that started it");
>
>> So when a MySpecialException is thrown its caught by the above configuration and routed to the ""the endpoint URL that started it". All other exceptions is handled by the default DeadLetterChannel.
>
>
>
>> We might need to clean up the wiki and add some better samples for this.
>
>> Could you try it and report back if it worked. Then we could use your use-case as a sample to add to the wiki
>
>
>> 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 11:23
>> To: [hidden email]
>> Subject: ErrorHandler + DeadLetter
>
>> Hi,
>
>> is it possible to create a route where some exceptions are handled by
>> the deadletter queue and some other just returned to the starting endpoint?
>> I've only found examples where all errors are handed over to the
>> deadletter endpoint.
>
>> 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

iD8DBQFI6cz+DBHISU1oEKERAil7AKCsexHyGHnFzQ+TFhM/xYQJO8kKKACePkYR
fJhw0sbJP/6DgP4DMBEYRRE=
=rbD0
-----END PGP SIGNATURE-----