问题描述
我正在使用消息存储来存储消息,以防实际端点关闭.我的代理使用 vfs 传输,即它将从文件中读取消息并传送到端点.如果端点关闭,它会将消息存储在配置的 activemq 中.
I am using message store to store the message in case the actual end point is down. My proxy uses vfs transport, i.e it will read the message from the file and deliver to end point. In case the end point is down it will store the message in configured activemq.
当我保留单个文件时,我的配置工作正常.在保留更多文件(即更多消息)和端点关闭的同时,只有前几条消息被存储,其他消息丢失.
My configuration is working fine when i kept single file. While keeping more files(i.e more messages) and end point is down only first few message get stored others are lost.
即使我搜索了很多内容,其中大部分都表明这是由于端点挂起错误.我试图避免这种情况,但结果还是一样.
Even i searched a lot of content most of them suggesting it is due to End point suspension error. I tried to avoid that, but still the same result.
如何解决问题???
推荐答案
如果后端端点出现故障,默认端点将暂停 30000 毫秒.在暂停期间,突触不会尝试向暂停端点发送更多消息.但是您可以通过指定关闭他的行为 和
if backend endpoint fails,defualt endpoint will be suspended for 30000ms. During suspended time, synapse will not try to send further messages to suspended endpoint.But you can turnoff his behavior by specifying<initialDuration>0</initialDuration>
and <maximumDuration>0</maximumDuration>
以下是暂停时间为 0 的样本端点
following is sample endpoint with suspension time 0
<endpoint name="Endpoint">
<address uri="http://localhost:9000/services/SimpleStockQuoteService">
<timeout>
<duration>30000</duration>
<responseAction>fault</responseAction>
</timeout>
<suspendOnFailure>
<errorCodes>-1</errorCodes>
<initialDuration>0</initialDuration>
<progressionFactor>1.0</progressionFactor>
<maximumDuration>0</maximumDuration>
</suspendOnFailure>
<markForSuspension>
<errorCodes>-1</errorCodes>
</markForSuspension>
</address>
</endpoint>
这篇关于当实际端点关闭时如何避免 wso2 esb 中的端点暂停的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!