How to modify body of CamelMessage

Is it possible to directly modify the ‘body’ content of a CamelMessage?

I have a scenario where I have to modify the body through a transformation. If not, is the only other proper way to recreate an entirely new CamelMessage?

Messages should be immutable, so, yes, you should be creating an entirely new CamelMessage with the transformed body.

1 Like