Hi, i have a case where the enrichment it's not called, anyone knows why? (http4 lib)
The case: the route do a WS call to obtain a token, and after do another ws call and sending that token to obtain more data. if the second WS call fails with code 401, i want to do one more call to WS1 (to get a new token) and redeliver. The problem: when the "enrich" must be called, actually it pass over it and of course the farther call (when redelivery is done) with fail because old token is provided again. the code looks like: *onException*(HttpOperationFailedException.class) .choice() .when(predicate_is_Code_equals_401) .removeProperty(Exchange.EXCEPTION_CAUGHT) .to ("direct:updateTokenAgainFromWS1") .end() .maximumRedeliveries(3) .handled(true) .to(jms:someFailQueue); *from("direct:updateTokenAgainFromWS1")* .enrich("direct:getToken", new MyAggregationStrategy()); *from (jms: input)* .split(each_line_after_LF) .executorService(Executors.newFixedThreadPool(threadsPoolSize)) .to(direct:subRoute1) .end() *from(direct:subRoute1)* .recipientList (toWS1) .processor (setTheToken) .recipientList (toWS2_to_getData) .processor(parseData); The "subRoute1" is getting the first token from WS1, after is doint the call to WS2. The exception is raised with code 401. The thread goes to "choise", and it's going to "updateTokenAgainFromWS1". Here the subroute "getToken" is doing the job (obtaining a new token), but the "MyAggregationStrategy" is never called, so farther there is still the old token. I've debug it for a while and still not understanding why is not going throw the aggregation class. On the first call, it pass with success throw "MyAggregationStrategy", but seconds time when it comes from "onExeption" is not. Thanks, Costash -- View this message in context: http://camel.465427.n5.nabble.com/OnException-and-enrich-fail-tp5783510.html Sent from the Camel - Users mailing list archive at Nabble.com.