import org.apache.camel.CamelContext;
import org.apache.camel.component.activemq.ActiveMQComponent;
import org.apache.camel.component.activemq.ActiveMQConfiguration;
import org.apache.camel.impl.DefaultCamelContext;
import org.apache.camel.spring.SpringRouteBuilder;
public final class CamelJmsToRemoteExample {
private CamelJmsToRemoteExample() {
}
public static void main(String args[]) throws Exception {
CamelContext context = new DefaultCamelContext();
final String localBrokerURL = "tcp://localhost:61616";
final String remoteBrokerURL = "tcp://remoteip:61616";
ActiveMQComponent localComponent = new ActiveMQComponent();
ActiveMQConfiguration localConfiguration = new ActiveMQConfiguration();
localConfiguration.setBrokerURL(localBrokerURL);
localComponent.setConfiguration(localConfiguration);
ActiveMQComponent remoteComponent = new ActiveMQComponent();
ActiveMQConfiguration remoteConfiguration = new ActiveMQConfiguration();
remoteConfiguration.setBrokerURL(remoteBrokerURL);
remoteComponent.setConfiguration(remoteConfiguration);
// context.addComponent("activemq", localComponent);
context.addComponent("remoteActivemq", remoteComponent);
context.addRoutes(new CamelRouteBuilder());
context.start();
}
}
class CamelRouteBuilder extends SpringRouteBuilder {
@Override
public void configure() throws Exception {
from("activemq:TEST.FOO").to("remoteActivemq:TEST.FOO");
}
}
分享到:
相关推荐
Apache Camel is a Java framework that lets you implement the standard enterprise integration patterns in a few lines of code. With a concise but sophisticated DSL you snap integration logic into your ...
中文名: Camel 实战 原名: Camel in Action 作者: Claus Ibsen Jonathan Anstey 资源格式: PDF 版本: 英文文字版/更新源代码 出版社: Manning书号: 9781935182368发行时间: 2010年12月 地区: 美国 语言: 英文 简介: ...
Camel3 Camel6函数等matlab源代码
ApacheCamel-JDBC Apache Camel JDBC组件 代码样例Demo
Apache Camel 作为集成项目的利器,针对应用集成场景的抽象出了一套消息交互模型,通过组件的方式进行第三方系统的接入,目前Apache Camel已经提供了300多种组件能够接入HTTP,JMS,TCP,WS-*,WebSocket 等多种传输...
1: Meet Camel - FREE 2: Routing with Camel - AVAILABLE Part 2 Core Camel 3: Transforming Data with Camel - AVAILABLE 4: Using Beans with Camel - AVAILABLE 5: Error Handling - AVAILABLE 6:...
An advanced guide to Enterprise Integration using Apache Camel About This Book Integrate your applications with Apache Camel and enhance efficiency and scalability Master all the EIPs supported by ...
apache-camel 开发sample Apache Camel是一个基于规则路由和中介引擎,提供企业集成模式的Java对象(POJO)的实现,通过应用程序接口(或称为陈述式的Java领域特定语言(DSL))来配置路由和中介的规则。领域特定语言...
Apache Camel 开发使用指南中文版
Camel服务集成,服务编排操作文档
Camel in action 一书的PDF电子书 和源代码 The book is divided into three parts: ■ Part 1—First steps ■ Part 2—Core Camel ■ Part 3—Out in the wild
Camel in action 一书的PDF电子书 和源代码
Camel In Action一书第四章的中文版。
用camel-cxf调用webservice和发布一个webservice接口例子,首先启动QueryServiceMain主函数启动webservice接口,然后启动测试类TestWebservice。例子主要是实现java代码实现camel调用webservice接口
简化软件集成:一个ApacheCamel教程在本教程中,您将了解集成大型软件的一些最大挑战,以及ApacheCamel如何轻松解决这些难题。在您的软件工程中,您可能至少做了一次以下操作:1.确定应启动数据发送的业务逻辑片段。...
camel in action 中文版 第一章 费了很大力才找到中文版本,网上现在大多是英文版本的,上传此资粮供大家参考学习。
Apache Camel是一个开源Java框架,专注于使开发人员更容易集成和访问。它通过以下方式实现: •所有广泛使用的EIP的具体实施 •连接各种传输和API •易于使用的域特定语言(DSL)将EIP和传输连接在一起
Camel 是大众点评开发的软负载一体解决方案,承担了F5硬负载层后的软负载工作。Camel已成为大众点评网络流量中必不可缺的一层。 关于Camel的部署及使用,请参考Camel in Action: 国内 国外 Camel在大众点评的...
09-ApacheCamel-Timer Apache Camel Timer组件 定时器 代码Demo
ApacheCamel-FTP ApacheCamel-FTP Apache Camel FTP组件 Demo 样例