Mule在catch-exception策略块中的JMS队列中插入空有效负载

时间:2013-05-28 18:22:10

标签: jms mule

我在调用外部供应商Web服务时模拟超时异常(或其他任何其他原因)。我将原始有效负载存储在流的开始和catch-exception-strategy中,将有效负载替换为原始有效负载。 Payload被替换得很好,应用XSLT变换器,将转换后的有效负载复制到文件出站罚款,但奇怪的是JMS获取空消息(尽管消息属性完好无损)。使用Mule 3.3.1ActiveMQ。如果Active MQ替换为Sonic

,结果相同
<flow name="orderRequirementsToVendor">
        <jms:inbound-endpoint queue="order.vendor" />
        <set-variable variableName="originalPayload" value="#[message.payload]" />
        <outbound-endpoint address="${vendor.ws.url}" mimeType="text/xml" connector-ref="https.connector" responseTimeout="100">
            <cxf:proxy-client payload="body" enableMuleSoapHeaders="false">
                <cxf:inInterceptors>
                    <spring:bean class="org.apache.cxf.interceptor.LoggingInInterceptor" />
                </cxf:inInterceptors>
                <cxf:outInterceptors>
                    <spring:bean class="org.apache.cxf.interceptor.LoggingOutInterceptor" />
                </cxf:outInterceptors>
            </cxf:proxy-client>
        </outbound-endpoint>
        .
            .
            .

        <choice-exception-strategy>
            <catch-exception-strategy>
                <logger message="In catch exception strategy. Unknown Exception" level="ERROR" /> 
                <logger message="#[exception.causeException]" level="ERROR" />
                <set-payload value="#[flowVars.originalPayload]"/>
                <set-property propertyName="exception" value="#[exception.summaryMessage]"/>                
                <transformer ref="generalErrorTransformer" />   
                <file:outbound-endpoint path="/outbound/vendor/error/ack-before" outputPattern="out_vendor_transformed_ack_error_beforeStatusQueue[function:dateStamp].xml" />
                <jms:outbound-endpoint queue="order.status" /> 
                <file:outbound-endpoint path="/outbound/vendor/error/ack-after" outputPattern="out_vendor_transformed_ack_error_afterStatusQueue[function:dateStamp].xml" />                    
            </catch-exception-strategy>
        </choice-exception-strategy>        
    </flow> 

ack-beforeack-after都包含正确有效负载的文件,但order.status中收到的消息为空

修改 这是我的日志中的例外

2013-05-29 09:12:33,864 ERROR [orderRequirementsToVendor.stage1.02] exception.AbstractExceptionListener (AbstractExceptionListener.java:299) - 
********************************************************************************
Message               : COULD_NOT_READ_XML_STREAM. Failed to route event via endpoint: org.mule.module.cxf.CxfOutboundMessageProcessor. Message payload is of type: PostMethod
Code                  : MULE_ERROR-42999
--------------------------------------------------------------------------------
Exception stack is:
1. Read timed out (java.net.SocketTimeoutException)
  java.net.SocketInputStream:-2 (null)
2. Read timed out (com.ctc.wstx.exc.WstxIOException)
  com.ctc.wstx.sw.BaseNsStreamWriter:617 (null)
3. COULD_NOT_READ_XML_STREAM (org.apache.cxf.interceptor.Fault)
  org.apache.cxf.databinding.stax.StaxDataBinding$XMLStreamDataWriter:133 (null)
4. COULD_NOT_READ_XML_STREAM. Failed to route event via endpoint: org.mule.module.cxf.CxfOutboundMessageProcessor. Message payload is of type: PostMethod (org.mule.api.transport.DispatchException)
  org.mule.module.cxf.CxfOutboundMessageProcessor:144 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transport/DispatchException.html)
--------------------------------------------------------------------------------
Root Exception stack trace:
java.net.SocketTimeoutException: Read timed out
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java:129)
    at com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:293)
    + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
********************************************************************************

0 个答案:

没有答案