Hi guys

I have a business requirement where if an api call fails, I need to store
the payload in a database for future retry.

I have an onException clause like this

onException(java.net.SocketException.class)
        .handled(true)
        .maximumRedeliveries(3)
        .log("Records are dropping due to excessing number of socket
connections created. Dropping DPCI : ${property.dpci} , TCIN :
${property.tcin}")
        .to("log:MYAUDIT_2?showAll=true")
        .process(storeOriginalPayloadInDb)
        .end();


I have added a property called "originalPayload" containing the received
data. I want it to access the property in processor "
*storeOriginalPayloadInDb*"

I get NullPointorException accessing the property "originalPayload" ,
reason being all headers and properties of the original exchange are lost
by the time flow comes to onException block.

What is the way I can achieve my requirement?

Cheers

Reply via email to