5.3 同步方式
同步方式即请求方调用服务后,component将处理结果发送给另一个外部服务处理,并将处理结果反方向返回。
图 Synchronous
同步方式通过inbound和outbound endpoint的exchange-pattern=”request-response”实现,相应配置如下:
<flow name="echo">
<inbound-endpoint address="http://localhost:7007/services/Echo"
exchange-pattern="request-response" />
<cxf:jaxws-service serviceClass="demo.mule.umo.Echo" />
<component>
<singleton-object class="demo.mule.umo.StdIo" />
</component>
<vm:outbound-endpoint path="vm" exchange-pattern="request-response" />
</flow>
<flow name="vm">
<vm:inbound-endpoint path="vm" exchange-pattern="request-response" />
<component>
<singleton-object class="demo.mule.umo.Vm" />
</component>
<stdio:outbound-endpoint system="OUT" exchange-pattern="one-way" />
</flow>
同步方式适用于通过Mule调用远程服务的场景。
Mule软件中同步方式详解
本文详细介绍了Mule软件中的同步方式,包括其工作原理、实现方式以及适用场景。同步方式通过inbound和outbound endpoint的exchange-pattern实现,适用于通过Mule调用远程服务的场景。

4225

被折叠的 条评论
为什么被折叠?



