Mule - stop all flows from shutting down where MySQL connection in single flow fails

霸气de小男生 提交于 2019-12-06 12:19:05

问题


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.

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?


回答1:


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>

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.

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



来源:https://stackoverflow.com/questions/22659111/mule-stop-all-flows-from-shutting-down-where-mysql-connection-in-single-flow-f

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!