最近我在Camel中做了一个针对Spring Integration 的component,这样大家可以在Camel中很轻松地与Spring Integration中的模块进行交互。
有关Spring Integration Component 的使用大家可以参考Camel中的wiki
。
也许大家会问,Spring Integration
和Camel
都实现了Enteripse Integration Pattern
那两者有什么区别吗?
下面是 Spring Integration 的官方介绍
It provides an extension of the Spring programming model to support the well-known Enterprise Integration Patterns
while building on the Spring Framework's existing support for enterprise integration. It enables simple messaging within
Spring-based applications and integrates with external systems via
simple adapters. Those adapters provide a higher-level of abstraction
over Spring's support for remoting, messaging, and scheduling. Spring
Integration's primary goal is to provide a simple model for building
enterprise integration solutions while maintaining the separation of
concerns that is essential for producing maintainable, testable code.
从上面我们可以看出Spring Integration所提供的EIP实现时构建在Spring的编程模型上的;Camel也提供了Spring的支持,你可以通过Spring配置文件来描述复杂的EIP模型,从这个方面来说两者打成平手。
Spring
Integration 是通过adapter来接入外部消息系统的,这和Camel的Component很类似。由于Spring
Integration是最近才推出了1.0.0M3, 其所支持的接入的外部系统还很少。从这个角度来说的话,在Camel中实现Spring
Integration Component就有很大的必要了,一个是在Spring Integration
模块中可以复用Camel的component,另一个方面来说Camel可以借助Spring
Integration中对SpringBean的支持实现对Spring 编成模式的无缝支持。
有兴趣的朋友可以使用svn 从下面的地址下载Camel最新的代码,体验一下。
http://svn.apache.org/repos/asf/activemq/camel/trunk/
分享到:
相关推荐
2. **Spring Integration with Camel**:理解如何在Spring环境中配置和管理Camel组件,使用`@Component`和`@Endpoint`注解,以及`CamelContext`和`RouteBuilder`类。了解Spring Boot与Camel的集成,利用自动配置简化...
13. **JMX Component Example**:介绍了如何使用camel-jmx组件,允许对运行中的Camel应用程序进行JMX管理,实现远程监控和控制。 14. **LoadBalancing Mina Example**:展示了如何使用负载均衡EIP,通过MINA(一个...
对于Apache Camel,开发者可能会对camel-core、camel-component、camel-api等模块的源代码感兴趣,这些模块提供了Camel的基础功能和与各种协议、技术的集成。 在标签中提到的"jar",指的是Java Archive文件,是Java...
Apache Camel 是一个强大的开源集成框架,基于广泛认可的企业集成模式(Enterprise Integration Patterns,简称 EIP)。它提供了一种智能的 Bean 集成方式,允许开发者在 Java 基于的领域特定语言(Domain Specific ...
**Apache Camel** 是一个强大的开源集成框架,基于已知的企业集成模式(Enterprise Integration Patterns, EIP),并提供了强大的 Bean 集成能力。它支持多种编程语言和配置方式,包括 Java 基于领域特定语言 (DSL) ...