【问题标题】:Ignore response from Mule HTTP outbound endpoint and continue processing忽略来自 Mule HTTP 出站端点的响应并继续处理
【发布时间】:2013-10-10 22:48:00
【问题描述】:

我有一个简单的 Mule 流程,我通过 HTTP 端点接收 XML 消息,然后对其进行一些处理。第一步是通过另一个出站 HTTP 端点将消息发送到 Web 服务。该服务只是保存消息而不对其进行处理。因此,我实际上想忽略出站端点的返回值并继续处理最初收到的消息。我尝试让端点继续运行,但我当前的 Mule 消息变为空。

如何调用端点,但忽略任何返回并继续处理我的原始消息?

【问题讨论】:

    标签: http mule


    【解决方案1】:

    您可以使用<wiretap>http://www.mulesoft.org/documentation/display/current/Routing+Message+Processors#RoutingMessageProcessors-WireTap

    或使用<async> 作用域:http://www.mulesoft.org/documentation/display/current/Async+Scope+Reference

    如果您想将响应存储在变量中但不考虑当前有效负载,请使用<enricher>http://www.mulesoft.org/documentation/display/current/Message+Enricher

    请注意,窃听器和丰富器是同步的,并且会阻止异步不会的进一步处理。

    【讨论】:

      【解决方案2】:

      在这种情况下,异步应该是更好的选择。

      Mule 中的异步有助于继续处理,忽略异步内部调用的消息处理器的结果。

      ex:
      <flow name="sample" >
        <http:inbound-endpoint ...... />
         ....  Some processing.....
         <async>
            <http:outbound-endpoint  ....... />
         </async>
         ......  Continue with the processing with the original message....
      
       </flow>
      

      希望这会有所帮助。

      【讨论】:

        猜你喜欢
        • 2014-04-23
        • 1970-01-01
        • 2013-11-03
        • 2011-05-07
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2018-07-12
        • 1970-01-01
        相关资源
        最近更新 更多