在 Grails 中运行时创建 Camel 路由
Grails 路由插件 使得在编译时创建 Apache Camel 路由变得非常简单。有没有办法在运行时创建新路线?
The Grails routing plugin makes creating Apache Camel routes at compile-time trivial. Is there a way to create new routes at runtime?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在这里查看完整的演练:Grails, Camel 并在运行时添加路由
Look here for a complete walk-through: Grails, Camel and adding routes at runtime
Camel 有用于在运行时创建和添加路由的 API。
例如从 XML 加载路线
http://camel.apache.org/loading-routes-from-xml -files.html
您还可以使用模型包中的 API 或使用 RouteBuilder 实例并定义您的路线。然后只需使用CamelContext上的API来添加路由即可。
Camel has API for creating and adding routes at runtime.
For example loading routes from XML
http://camel.apache.org/loading-routes-from-xml-files.html
And you can also use the API from the model package or use a RouteBuilder instance and define your routes. Then just use the API on CamelContext to add routes.
这个插件几天前才发布 - 你最好的办法是询问插件开发人员。
This plugin was only released a couple of days ago - your best bet is to ask the plugin developers.