-----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:[EMAIL PROTECTED] > Sent: 2. oktober 2008 11:57 > To: [email protected] > 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:[EMAIL PROTECTED] >> Sent: 2. oktober 2008 11:23 >> To: [email protected] >> 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-----
