Yes its by design the failed operation "rollback" so you can perform redeliveries and whatnot, without having the exchange tangled with side-effects and left overs from previous attempt.
The intent is that the data on exchange only changes if the operation is success. On Thu, Feb 11, 2016 at 6:41 AM, ourdatguy <ourdat...@gmail.com> wrote: > Actually, in line with the above answer, the only way I found to set and > preserve headers in a catch block is to set the headers on the original > message acquired through the unit of work (which can be accessed through the > exchange). > > For example: > > try{ > //doing something awseome with my component > } catch(SomeException se) { > exchange > .getUnitOfWork() > .getOriginalInMessage() > .getHeaders() > .put(“MySpecialHeader”,”MySpecialValue"); > > exchange.setException(se) //or throw > } > > > /dcb > > David C. Bauer > email: ourdat...@gmail.com <mailto:ourdat...@gmail.com> > skype: tucsonalama > mobile: 801-995-0516 > -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2