动态变化端点骆驼 [英] 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);
改变旧的端点,以新的端点
change old endpoint to new endpoint
camelContext.startRoute(TestRoute.ROUTEID);
但我的努力不能正常工作。
but my efforts not work properly.
感谢您的帮助。
推荐答案
您需要
- 停止路线
- 删除路径
- 更改端点
- 添加路由
- 启动路线
这允许您从端点改变任何你想要的(例如别的东西)
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屋!
查看全文