使用 WSO2 作为企业服务总线,我能够为我的 Web 服务 (WCF) 建立代理服务。为了减少我的 Web 服务的负载,我计划使用 WSO2 中的消息存储并使用转发处理器,这样我就可以以可以接受的速度提供我的 Web 服务。我参考了这篇 文章,它讨论了输入/输出服务,其中响应只是登录到文件中。是否可以使用此模式将响应返回给客户端,而不仅仅是将其记录在文件中?
我不确定这是否可能,如果有人能提供任何关于我应该如何设置代理服务的想法,我将不胜感激。
您可以通过添加一个中介来修改replySequence
文章中提到的内容,删除这样的..<send/>
<drop/>
<sequence xmlns="http://ws.apache.org/ns/synapse" name="replySequence">
<log level="full">
<property name="REPLY" value="MESSAGE">
</property></log>
<!-- Send the messages where they are destined to (i.e. the 'To' EPR of the message) -->
<send/>
</sequence>
..或者您可以定义端点以像这样显式发送回复..
<sequence xmlns="http://ws.apache.org/ns/synapse" name="replySequence">
<log level="full">
<property name="REPLY" value="MESSAGE">
</property></log>
<!-- Send to an explicit address -->
<send>
<endpoint>
<address uri="http://{Add your address here}/"/>
</endpoint>
</send>
</sequence>