How to get Camel FTP to fetch only once on demand

怎甘沉沦 提交于 2019-12-02 08:58:12

So the solution I found is using the scenario #1, but stop and restart the route.

exchange.getContext().stopRoute(routeId);
exchange.getContext().startRoute(routeId);

You can use a CountDownLatch to stop the route from a route as specified here - http://camel.apache.org/how-can-i-stop-a-route-from-a-route.html. It works like charm for me..

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!