如何使用 Mule 中的新 HTTP 连接器实现 "one-way" 交换模式?

How To Achieve "one-way" Exchange Pattern With The new HTTP Connector In Mule?

我引用自Mule official documentation

On the old HTTP Connector, both for inbound and outbound endpoints, it was possible to set up the exchange-pattern so that messages only went in one direction, so inbound endpoints would send no request back to the requestor, and outbound endpoints would not listen for a response to their requests. The new HTTP Connector always has a two way communication.

在新的 HTTP 连接器中似乎单向不是一个选项,但我确实需要在我的应用程序中使用单向交换模式(我的应用程序和子公司的整个体系结构主要是不同服务器上的服务全国各地)执行如下代码:

<until-successful objectStore-ref="objectStore" maxRetries="${MaximumRetry}" secondsBetweenRetries="${RetryInterval}">
    <http:outbound-endpoint address="${EMCURL}" exchange-pattern="one-way">
        <transformer ref="contentTypeTextXML"/>
    </http:outbound-endpoint>
</until-successful>

那么在迁移到新的 HTTP 连接器时我有哪些选择? 我看到三个选项

  1. 寻找另一种方式(也许我毕竟不应该使用 HTTP 连接器)。
  2. 寻找黑客解决方案
  3. 使用旧的 http:outbound-端点,并坚持使用 Mule 3.6

你推荐哪一个?

谢谢

如果您对响应不感兴趣,只需将 HTTP 请求放在异步范围或通过单向虚拟机端点调用的另一个流中。