2013-04-22 62 views
2

将JMS消息传递到队列后,我看到与Stream Closer相关的日志语句。它看起来不正确,我为什么看到这条消息?Mule - 找不到流类型的StreamCloser:class java.lang.String

2013-04-22 19:08:29,385 [DEBUG] org.mule.transport.jms.activemq.ActiveMQJmsConnector - Returning dispatcher for endpoint: jms://retry.queue = EeJmsMessageDispatcher{this=5c5801d7, endpoint=jms://retry.queue, disposed=false} 
2013-04-22 19:08:29,433 [DEBUG] org.mule.util.DefaultStreamCloserService - Unable to find an StreamCloser for the stream type: class java.lang.String, the stream: <?xml version="1.0" encoding="UTF-8"?> < ....... rest of the XML ....... /> will not be closed. 

这是什么意思?“流:不会被关闭。”?

我应该怎么做才能解决这个问题?

====编辑=====

发生错误。 JMS消息具有XML作为有效负载。骡子版本:3.3.2

这是我在流水平DEBUG

<flow name="sendToHost"> 
    <jms:inbound-endpoint queue="host.queue" exchange-pattern="one-way" /> 
    <copy-properties propertyName="*" />  
    <file:outbound-endpoint path="/hostmessages" outputPattern="outgoing-xml-[function:dateStamp].log" /> 
    <set-variable variableName="hostXML" value="#[payload]" /> 
    <flow-ref name="webServiceCall" /> 
    <flow-ref name="inspectWSResponse" /> 
    <exception-strategy ref="retryExceptionStrategy" /> 
</flow> 

<flow name="resendFailedMessages"> 
    <description> 
     "*/15 07-18 * * ?" run every 15 minutes from 7 am to 6 pm every day --> 
    </description> 
    <quartz:inbound-endpoint jobName="hostRedeliveryJob" cronExpression="0 0/1 * * * ?"> 
     <quartz:endpoint-polling-job> 
      <quartz:job-endpoint ref="redeliverToHost" /> 
     </quartz:endpoint-polling-job> 
    </quartz:inbound-endpoint> 
    <set-variable variableName="hostXML" value="#[payload]" /> 
    <logger message="QUARTZ found message for host" level="INFO" /> 
    <flow-ref name="webServiceCall" /> 
    <flow-ref name="inspectWSResponse" /> 
    <exception-strategy ref="retryExceptionStrategy" /> 
</flow> 

<choice-exception-strategy name="retryExceptionStrategy"> 
    <catch-exception-strategy when="#[exception.causedBy(java.io.IOException)]"> 
     <logger message="In retryExceptionStrategy IO exception strategy. " level="ERROR" /> 
     <logger message="retryExceptionStrategy exception is #[exception.causeException]" level="ERROR" /> 
     <set-property propertyName="exception" value="#[exception.summaryMessage]" /> 
     <set-payload value="#[hostXML]" /> 
     <logger message="retryExceptionStrategy payload is #[payload]" level="ERROR" /> 
     <jms:outbound-endpoint queue="retry.queue" /> 
    </catch-exception-strategy> 
    <catch-exception-strategy> 
     <logger message="Other error in sending result to host in retryExceptionStrategy flow." level="INFO" /> 
     <set-property propertyName="exception" value="#[exception.summaryMessage]" /> 
     <set-payload value="#[hostXML]" /> 
     <jms:outbound-endpoint queue="declined.queue" /> 
    </catch-exception-strategy> 
</choice-exception-strategy> 

<sub-flow name="webServiceCall"> 
    <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 address="${host.ws.url}" mimeType="text/xml" connector-ref="http.connector" /> 
    <byte-array-to-string-transformer /> 
</sub-flow> 

<sub-flow name="inspectWSResponse"> 
    <choice> 
     <when expression="#[xpath('//acord:TestResult/acord:TestCode/acord:Name/@tc').value == '1']"> 
      <logger message="Message Delivered Successfully to host" level="INFO" /> 
     </when> 
     <otherwise> 
      <set-payload value="#[hostXML]" /> 
      <jms:outbound-endpoint queue="declined.queue" /> 
     </otherwise> 
    </choice> 
</sub-flow> 

回答

3

日志条目通常可以忽略。

在这种特殊情况下,似乎骡子是对邮件的有效载荷是不是甲流,但字符串使用StreamCloserService

查看源代码,这似乎只有在异常处理和Mule试图强行关闭流的有效载荷没有检查,如果它实际上是分流到可能发生。这是良性的,不能引发任何副作用,所以你可以放心地忽略这个DEBUG声明。

+0

大卫......谢谢你看着它。我已经更新了这个问题。 – user1493140 2013-04-23 00:07:55

+0

我想这是一个'javax.jmx.TextMessage'(未指定)。既然你有错误,那么这个'DEBUG'消息是预期的。我相应地更新了我的答案。 – 2013-04-23 00:15:40

相关问题