camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Elvio Caruana (ecaruana)" <>
Subject cannot exchange mesasge body during a retryWhile()
Date Sun, 26 Jan 2014 18:40:57 GMT
Hi all,

I've got a scenario where given an exception on a route, I want to retry the sub-route but
with a modified body (String.class type).
             .retryWhile(new Predicate() {
                public boolean matches(Exchange exchange) {
                           if (canContinue()) {
                              exchange.getIn().setBody("newly modified string");
                              return true;
                           else {
                                  return false;


The retries are being done correctly and exhausted at the right time - however every retry
always has the original body, and not the modified string body I was expecting. Am I not able
to modify the exchange body on retry?

Many Thanks,

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message