动态变化端点骆驼 [英] dynamic change endpoint camel

查看:103
本文介绍了动态变化端点骆驼的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能从端点改变动态的方式?
比如我想更改

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.

感谢您的帮助。

推荐答案

您需要


  1. 停止路线

  2. 删除路径

  3. 更改端点

  4. 添加路由

  5. 启动路线

这允许您从端点改变任何你想要的(例如别的东西)

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


  1. 停止路线

  2. 改变对JMS端点
  3. 选项
  4. 启动路线

但也有可能是一些组件无法做到这一点。

But there may be some components which cannot do that.

这篇关于动态变化端点骆驼的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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