Erick Audet
Erick Audet

Reputation: 344

wso2esb dead letter channel does not work in version 4.9.0

Very simple question. I am using vanilla wso2esb 4.9.0 and trying out the dead letter channel design. It fails! The message that is stored in the queue is the soap fault error received from by endpoint. What am I doing wrong? This is work right? The example that I am following is: https://docs.wso2.com/display/IntegrationPatterns/Dead+Letter+Channel

<proxy xmlns="http://ws.apache.org/ns/synapse" name="Proxy1"
transports="https,http" statistics="disable" trace="disable"
startOnLoad="true">
<target>
    <inSequence>
        <log level="full" />
    </inSequence>
    <outSequence>
        <log level="full">
            <property name="MSG" value="Response...." />
        </log>
        <send />
    </outSequence>
    <faultSequence>
        <log level="full">
            <property name="MSG" value="++++++++++FAULT---------...." />
        </log>
        <property name="target.endpoint" value="ReportDataTransferServiceEp" />
        <store messageStore="ReportMessageStore" />
    </faultSequence>
    <endpoint>
        <address uri="http://localhost:8080/TestSoapESB/webservices/ReportDataTransferService" />
    </endpoint>
</target>
<publishWSDL
    uri="http://localhost:8080/TestSoapESB/webservices/ReportDataTransferService?wsdl" />
<description></description>

Upvotes: 0

Views: 86

Answers (1)

Jean-Michel
Jean-Michel

Reputation: 5946

as inside outSequence, you know that the current message is the response and not the initial message received inside the inSequence, in the faultSequence, you cannot rely on the fact that the initial message will remain unchanged : you must save it at the top of inSequence and restore it before calling store in faultSequence :

save :

<enrich>
    <source type="envelope" clone="true"/>
    <target type="property" property="INPUT_MESSAGE"/>
</enrich>

restore :

<enrich>
    <source type="property" clone="false" property="INPUT_MESSAGE"/>
    <target type="envelope"/>
</enrich>

Upvotes: 0

Related Questions