动态变化端点骆驼 [英] dynamic change endpoint camel
本文介绍了动态变化端点骆驼的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以以动态方式从端点更改?例如我想改变
Is it possible to change from endpoint in dynamic way ? for example I want change
for(endpointFirst).routeId(ROUTEID).to(finishEndpoint);
到
for(endpointSecond).routeId(ROUTEID).to(finishEndpoint);
我尝试使用
camelContext.stopRoute(TestRoute.ROUTEID);
将旧端点更改为新端点
camelContext.startRoute(TestRoute.ROUTEID);
但我的努力没有奏效.
感谢您的帮助
推荐答案
您需要
- 停止路线
- 删除路由
- 更改端点
- 添加路由
- 开始路线
这允许您将 from 端点更改为您想要的任何内容(例如其他内容)
This allows you to change the from endpoint to whatever you want (for example something else)
某些组件/端点确实允许更改选项并在运行时更新这些选项.例如,JMS 端点允许这样做,因此您可以
Some components / endpoint do allow to change options an have those being updated at runtime. For example the JMS endpoint allows this, so you can
- 停止路线
- 更改 jms 端点上的选项
- 开始路线
但可能有些组件无法做到这一点.
But there may be some components which cannot do that.
这篇关于动态变化端点骆驼的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文