使用Camel 11,可能会升级到13.0:
Req:如果路由的某些部分抛出FatalException或其子类,则应该停止路由。我如何在SpringDSL的 onExpression 部分表达这一点。如果那不是正确的地方,那么正确的地方是什么?
<onException>
<exception>eri.odapp.OdAppFatalException or its subclass</exception>
<log loggingLevel="ERROR" message="A fatal error happend in route <routeName> while processing file: ${header.CamelFileName}, Shutting down the route " />
<!-- Shut down the route where this fatal exception happened (so admins can rectify the scenario and restart the flow)-->
</onException>
致命异常层次结构:
public class OdAppException extends RuntimeException
public class OdAppIOException extends OdAppFatalException
public class OdAppDataAccessException extends OdAppFatalException
答案 0 :(得分:0)