Mule - 停止所有流从关闭,其中单个流中的MySQL连接失败 [英] Mule - stop all flows from shutting down where MySQL connection in single flow fails

查看:244
本文介绍了Mule - 停止所有流从关闭,其中单个流中的MySQL连接失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Mule应用程序,有多个流程执行各种操作。其中一个流连接到外部MySQL数据库以检索信息。如果连接到这个数据库失败,我的Mule应用程序无法启动,我的其他,没有错误的流开始。

I have a Mule application with a number of flows all performing various operations. One of these flows connects to an external MySQL database to retrieve information. If the connection to this database fails, my Mule application fails to start and none of my other, non-erroneous, flows start.

有一种方法,我可以配置Mule在连接失败或有其他一些错误,所有其他流将正常运行的情况下,恢复到连接到外部DB的流的异常策略?

Is there a way I can configure Mule to revert to the exception strategy of the flow connecting to the external DB in the event that the connection fails or there is some other error so that all other flows will run as normal?

推荐答案

在全局jdbc连接器上,设置重新连接策略,并将阻止属性配置为 false 。示例:

On your global jdbc connector, set a reconnection strategy and configure the blocking attribute to false. Example:

<jdbc:connector name="mysql">
   <reconnect-forever blocking="false" />
</jdbc:connector>

这将阻止连接异常阻止您的Mule应用程序,并应允许其他流

This will stop the connection exceptions from blocking your Mule app and should allow you other flows that don't rely on the connector to work as normal.

有关重新连接策略的详情,请参阅:http://www.mulesoft.org/documentation/display/current/Configuring+Reconnection+Strategies

More on reconnection strategies here: http://www.mulesoft.org/documentation/display/current/Configuring+Reconnection+Strategies

这篇关于Mule - 停止所有流从关闭,其中单个流中的MySQL连接失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆