Mule - stop all flows from shutting down where MySQL connection in single flow fails(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 配置为恢复到连接到外部数据库的流的异常策略,以便所有其他流正常运行?
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 连接器上,设置重新连接策略并将 blocking 属性配置为 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 连接失败的情况下阻止所有流关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Mule - 在单流中的 MySQL 连接失败的情况下阻止所有流关闭
基础教程推荐
- 将 SQL Server DateTime 列迁移到 DateTimeOffset 2021-01-01
- 无法解决整理冲突 2021-01-01
- 如何使用 mysql.connector 禁用查询缓存 2022-01-01
- SQL:使用来自具有相同列名的两个表中的数据... 2021-01-01
- SQL 效率:WHERE IN 子查询 vs. JOIN 然后 GROUP 2021-01-01
- 是否可以执行按位分组功能? 2021-01-01
- 在 SQL 中连接多个表 2021-01-01
- SSMS 中的权限问题:“对象 'extended_properties'、数据库 'mssqlsystem_resource'、... 错误 229)上的 SELECT 权限被拒绝" 2022-01-01
- 需要 MySQL 5.1 中的抽象触发器来更新审计日志 2021-01-01
- SQL Server 实例在登录协商期间返回无效或不受支持的协议版本 2021-01-01
