Apache Camel 2.13.0 退出拆分器 [英] Apache Camel 2.13.0 quit splitter

查看:17
本文介绍了Apache Camel 2.13.0 退出拆分器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一条带分离器的路线.每次发生某些事情时,我都需要停止拆分工作.当然 onCompletion 可以帮助我,但是:

I have a route with splitter. I need to stop the splitting-job each time it occurs something. Naturally onCompletion can help me but:

关于帖子Apache Camel Loop 不会因异常而停止",这是一个错误,如果我们使用

Regarding post "Apache Camel Loop does not stop on exception", it is a bug that if we use

.onCompletion().onFailureOnly()
    .process(new MyStopRouteProcessor("routeName"))
.end()

拆分器不会停止拆分.我必须使用 2.13.0,别无选择.我该如何解决问题?

the splitter does not stop splitting. I have to use 2.13.0 and have not any choice. How can I solve the problem?

推荐答案

在拆分器上设置选项 stopOnException=true,如下所述:http://camel.apache.org/splitter

Set the option stopOnException=true on the splitter as documented here: http://camel.apache.org/splitter

这篇关于Apache Camel 2.13.0 退出拆分器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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