Hi I forgot to mention that in onException you can route it as you please, so you could do some content based routing in onException based on http error codes.
The new onWhen in Camel 1.5.1 is for really fine grained selection, so you could skip this onException in some special cases. On Tue, Dec 16, 2008 at 4:21 PM, Claus Ibsen <claus.ib...@gmail.com> wrote: > Hi > > Sorry you need Camel 1.5.1 or later. There is a new predicate you can > attach the onException, it's onWhen where you can do your custom code > logic to determine what should happen > > See > http://activemq.apache.org/camel/exception-clause.html > > The fine grained section which explains the onWhen > > > And the http component adds the response code as a header to the > message so you can use a header predicate to test. > http://activemq.apache.org/camel/http.html > > HttpProducer.HTTP_RESPONSE_CODE int The http response code from > the external server. Is 200 for OK. Is set on the OUT message. > > > > On Tue, Dec 16, 2008 at 4:15 PM, boriss <bstan...@eunet.rs> wrote: >> >> Hi, >> >> I want to be able to set different redeliveryStrategy if the >> HttpOperationFailedException returns for example 4xx other then 5xx. Is this >> possible with the "onException" clause?? >> >> Many thanks, >> Regards >> >> -- >> View this message in context: >> http://www.nabble.com/HttpOperationFailedException-question-tp21034938s22882p21034938.html >> Sent from the Camel - Users mailing list archive at Nabble.com. >> >> > > > > -- > > /Claus Ibsen > Apache Camel Committer > Blog: http://davsclaus.blogspot.com/ > -- /Claus Ibsen Apache Camel Committer Blog: http://davsclaus.blogspot.com/