camel笔记
来源:互联网 发布:淘宝商城靴子 编辑:程序博客网 时间:2024/06/06 00:12
camel是一个开源的集成框架,它的核心特征是它的路由和中介引擎。而它有两种方式去定义路由的规则:
1.基于java特定域的DSL 语言
2.Spring Xml配置的方式。
Java DSL :from("file:data/inbox").to("jms:queue:order");
Spring DSL:<route>
<from uri="file:data/inbox"/>
<to uri="jms:queue:order"/>
</route>
<from uri="file:data/inbox"/>
<to uri="jms:queue:order"/>
</route>
public class FileCopierWithCamel {
public static void main(String args[]) throws Exception {
CamelContext context = new DefaultCamelContext();
context.addRoutes(new RouteBuilder() {
public void configure() {
from("file:data/inbox?noop=true")
.to("file:data/outbox");
}
});
context.start();
Thread.sleep(10000);
context.stop();
}
}
public static void main(String args[]) throws Exception {
CamelContext context = new DefaultCamelContext();
context.addRoutes(new RouteBuilder() {
public void configure() {
from("file:data/inbox?noop=true")
.to("file:data/outbox");
}
});
context.start();
Thread.sleep(10000);
context.stop();
}
}
noop选项告诉camel把源文件保留。如果你不使用这个选项,文件会被删除。
0 0
- camel笔记
- Camel学习笔记(一)
- Camel
- Camel
- Camel
- 基于apache camel的fuse 学习笔记(1)
- 基于apache camel的fuse 学习笔记(2)
- spring boot 学习笔记(008)Apache camel
- camel 基本概念
- camel-file
- camel components
- camel Intercept
- AdviceWith camel
- Camel summary
- Camel-MongoDb
- Camel-blueprint
- Apache Camel
- camel-exchange
- rhel chkconfig
- android与js交互-jsbridge
- 前端如何限制图片的大小和格式
- 最全的Android源码目录结构详解
- SpringMVC——对Ajax的处理(包含 JSON 类型)
- camel笔记
- MACOS Sierra 10.12安全性与隐私没有任何来源选项
- Qt中嵌入OSG控件的方法
- AlamofireObjectMapper框架的基本使用以及二次封装
- Creating Great Teams: How Self-Selection Lets People Excel(读书笔记)
- 生产者消费者问题(C实现)
- linux partation
- Jackson属性和方法注解规避
- vs2015关于“当前不会命中断点 还没有为该文档加载任何符号”的解决方法