【问题标题】:wso2esb dead letter channel does not work in version 4.9.0wso2esb 死信通道在 4.9.0 版本中不起作用
【发布时间】:2017-11-17 16:33:58
【问题描述】:

很简单的问题。我正在使用 vanilla wso2esb 4.9.0 并尝试死信通道设计。它失败!存储在队列中的消息是端点接收到的肥皂故障错误。我究竟做错了什么?这是工作吧?我下面的例子是: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>

【问题讨论】:

    标签: wso2 wso2esb


    【解决方案1】:

    作为 outSequence 内部,您知道当前消息是响应而不是 inSequence 内部收到的初始消息,在 faultSequence 中,您不能依赖初始消息将保持不变的事实:您必须将其保存在inSequence 的顶部并在调用 store in faultSequence 之前恢复它:

    保存:

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

    恢复:

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

    【讨论】:

    • 谢谢让-米歇尔。这已经解决了问题。现在,我想知道我们如何更新死信通道示例,这样其他人就不会落入同样的陷阱。
    • 我想最好的方法是创建一个 Jira 并要求更新文档:wso2.org/jira/browse/ESBJAVA
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-03-27
    • 1970-01-01
    相关资源
    最近更新 更多