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

Reply via email to