4 Replies Latest reply on Feb 15, 2017 4:02 PM by Claus Ibsen

    How to pass a camel exchange property into CacheBasedMessageBodyReplacer processor

    Markus Stülp Newbie

      Hi,

      I try to do some tests with the cache component in Camel and would like to pass a Camel exchange property into the CacheBasedMessageBodyReplacer processor.

      I tried the following:

           .process(new CacheBasedMessageBodyReplacer("cache://MyApplicationCache", exchangeProperty("CamelTimerCounter").convertToString()))

       

      However the result of exchangeProperty("CamelTimerCounter").convertToString() is of type ValueBuilder while the constructor expects a String.

      How can I pass the exchange property as String into the constructor?

       

      Thanks,

      Markus