Mule 迁移到新的HTTP连接器
我已经从Mule 3.3.x升级到3.6.x,由于旧的http端点在3.6.x中被弃用,我想迁移到新的http连接器 下面是调用Web服务和healthcheck的原始代码 WebserviceMule 迁移到新的HTTP连接器,mule,Mule,我已经从Mule 3.3.x升级到3.6.x,由于旧的http端点在3.6.x中被弃用,我想迁移到新的http连接器 下面是调用Web服务和healthcheck的原始代码 Webservice <http:outbound-endpoint connector-ref="NoSessionConnector" address="${testmigrationapp.endpoint.url}"
<http:outbound-endpoint connector-ref="NoSessionConnector"
address="${testmigrationapp.endpoint.url}"
responseTimeout="${testmigrationapp.endpoint.timeout}" keep-alive="true"
responseTransformer-refs="errorHandler">
<jms:transaction action="ALWAYS_JOIN"/>
健康检查
<http:inbound-endpoint exchange-pattern="request-response" address="${testmigrationapp.healthcheck.address}" doc:name="HTTP"/>
我将如何使用新的HTTP连接器实现这一点
谢谢HTTP出站端点将转换为HTTP请求。您需要定义一个
请求配置
,指定主机、端口和持久连接(因为keep alive=true
)。然后,您可以使用指定URL路径和响应超时的请求元素替换出站端点。例如:
<http:request-config name="persistentRequestConfig" usePersistentConnections="true" host="example.com" port="80" />
<flow name="persistent">
<http:request config-ref="persistentRequestConfig" path="/" responseTimeout="30" />
</flow>
<http:listener-config name="listenerConfig" host="0.0.0.0" port="8081"/>
<flow name="testFlow">
<http:listener config-ref="listenerConfig" path="/"/>
<echo-component/>
</flow>
有关迁移的更多详细信息,您可以查看我们的网站。您查看了Mule网站上的文档吗?是的,但没有多大帮助