简体   繁体   English

Mule ESB中的重新连接策略

[英]Reconnection strategy in Mule ESB

I am trying to verify the Reconnection strategy in Mule ESB as mentioned in the documentation. 我正在尝试验证文档中提到的Mule ESB中的重新连接策略。

I have set the standard Reconnection strategy with retry attemts as 5 and with some timeout. 我已经设置了标准的重新连接策略,重试时间为5并且有一些超时。

(My end point is not reachable, as intentionally stopped it to test the scenario). (我的终点无法到达,因为故意停止测试场景)。

I have the exception in the Mule console as: Exception stack is: 1. Connection refused: connect (java.net.ConnectException) java.net.DualStackPlainSocketImpl:-2 (null) 2. Failed to route event via endpoint: DefaultOutboundEndpoint 我在Mule控制台中有例外:异常堆栈是:1。连接被拒绝:connect(java.net.ConnectException)java.net.DualStackPlainSocketImpl:-2(null)2。无法通过端点路由事件:DefaultOutboundEndpoint

And then I changed the reconnection strategy to 'connect forever' and tried it. 然后我将重新连接策略更改为“永远连接”并尝试了它。 In this case also I got the same error. 在这种情况下,我也得到了同样的错误。

My qstn is, if I set the 'Connect forever' feature, then I expect the application to try for re connect untill it gets succeeded. 我的qstn是,如果我设置'永远连接'功能,那么我希望应用程序尝试重新连接,直到它成功。 but this is not happenning. 但这不会发生。

And also in the first scenario, if my retry attemps are 5, then I dont see any loogs mentioning the number of retry attempts made. 而且在第一种情况下,如果我的重试尝试是5,那么我没有看到任何提到重试尝试次数的问题。

Can any one plese explain it in better way whether this reconnection property is actually working in Mule ESB 3.4. 任何人都可以更好地解释这个重新连接属性是否真的在Mule ESB 3.4中工作。

Thanks in advance. 提前致谢。

HTTP is a disconnected protocol: the reconnection strategies only work for connected protocols, like JMS or JDBC. HTTP是一种断开连接的协议:重新连接策略仅适用于连接的协议,如JMS或JDBC。

I see the error is in an outbound endpoint so I have the impression you are expecting Mule to retry the dispatch, not reconnected the transport. 我看到错误出现在出站端点,所以我觉得你期望Mule 重试调度,而不是重新连接传输。

One way to do retries is to use the until-successful message processor. 重试的一种方法是使用until-successful消息处理器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM