You can flip it around and turn off that option on error handler. Then from the exchange unit of work you can get access to the original message. There is Java API for that.
On Wed, Aug 12, 2015 at 10:20 AM, Felix Thomas <[email protected]> wrote: > Hello, > > I have configured my DeadLetterchannel as below . I am getting the > Oriiginal Body in the ErrorHandler , But i want to have the original and > the modified body which I need to log in a DB at a Global Level. Is it > Possible to get Both in the Message Object.?? > > Below the config. > > <bean id="myErrorHandler" > class="org.apache.camel.builder.DeadLetterChannelBuilder"> > <property name="deadLetterUri" value="direct:myErrorRoute"/> > <property name="redeliveryPolicy" > ref="myRedeliveryPolicyConfig"/> > <property name="useOriginalMessage" value="true"/> > </bean> > > <bean id="myRedeliveryPolicyConfig" > class="org.apache.camel.processor.RedeliveryPolicy"> > <property name="maximumRedeliveries" value="1"/> > <property name="redeliveryDelay" value="5000"/> > <property name="allowRedeliveryWhileStopping" value="false"/> > </bean> > > > <!-- Error Handler Generic one --> > <route customId="false" id="myErrorRoute" xmlns=" > http://camel.apache.org/schema/spring"> > <from uri="direct:fridaErrorRoute"/> > <transform> > <method ref="CustomErrorProcessorBean" > method="createErrorEntry" /> > </transform> > <to uri="sqlComponent:{{sql.insertNewError}}" /> > </route> > > Regards, > Felix T -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2nd edition: http://www.manning.com/ibsen2
