Any modern application does not live in isolation. To realize the business requirements it has to communicate with customers of varied types and other applications in variety of ways. Application integration lets your application do this and in modern day applications, this is crucial for any application. Spring Integration aids in application integration that lets applications share data and services with each other making it connect with varied kind of users.
The Spring Integration is an open-source; simple integration framework that leverages the capabilities of widely adopted Spring Framework making application integration easy and simpler to implement.
This Chapter will help you start with Spring Integration and will aid you in achieving the various integration requirement in your application. I am sure after reading through this Chapter you will have one more weapon up your sleeves which you can use and reap benefits from its high level of integration capabilities.
Spring Integration Goals and Principles
Spring Integration is motivated by the following goals:
- Provide a simple model for implementing complex enterprise integration solutions.
- Facilitate asynchronous, message-driven behavior within a Spring-based application.
- Promote intuitive, incremental adoption for existing Spring users.
Spring Integration is guided by the following principles:
- Components should be loosely coupled for modularity and testability.
- The framework should enforce separation of concerns between business logic and integration logic.
- Extension points should be abstract in nature but within well-defined boundaries to promote reuse and portability.
The goals and principles of Spring Integration is as quoted in the Spring Integration Reference Manual.
Spring Integration Benefits
Spring Integration benefits can be summarized as follows:
- Loose coupling between components – brings about development of small and focused components that caters to specific role and responsibility. This eases testing and promotes reuse largely.
- Helps to separate integration and processing logic – Spring Integration pitches-in, handling message routing, transformation etc. and eases the application developer from this. Due to high level of configuration based integration style, easily processing can be switched between synchronous and asynchronous with no change in the code that is handy in this ever-changing business application scenario.
- Promotes Event-driven architecture – No hard coded process flows and capability to easily change and expend these flows according to application requirement. Single word that can be used is adaptability.
Enterprise Integration Pattern (EIP)
Enterprise Integration Patterns is a book by Gregor Hohpe and Bobby Woolf and describes a number of design patterns for the use of enterprise application integration and message-oriented middleware. Enterprise Integration Patterns can be implemented without coding using Spring Integration or Apache Camel.
Enterprise application integration is an integration framework composed of a collection of technologies and services, which form a middleware to enable integration of systems and applications across the enterprise.
Spring Integration brings the power of Dependency Injection (DI) that Spring Framework is well known for and EIP patterns implementation together to nicely manage the resources and lets you focus on business logic rather than messaging infrastructure code.
Spring Integration Namespaces
For easing the various integration style configurations, Spring Integration has dedicated namespaces for each of them. Table 22-1 gives details of Spring Integration namespace in a tabular form for easy reading and understanding.
Table 22-1. Spring Integration namespaces
|Defines the configuration elements for Spring Integration File Adapters.
|Defines the configuration elements for Spring Integration FTP Adapters.
|Defines the configuration elements for Spring Integration’s HTTP adapters.
|Defines the configuration elements for Spring Integration’s HttpInvoker adapters. NOTE: The http-invoker support is deprecated as of 2.0.x. It is recommended to use the REST-based HTTP adapters instead.
|Defines the configuration elements for Spring Integration’s XML support.
|Defines the configuration elements for Spring Integration’s JMS adapters.
|Defines the configuration elements for Spring Integration’s IP adapters.
|Defines the configuration elements for Spring Integration Event Adapters.
|Defines the core configuration elements for Spring Integration GemFire Support.
|Defines the configuration elements for Spring Integration’s JDBC components.
|Defines the configuration elements for Spring Integration’s JMX adapters.
|Defines the configuration elements for Spring Integration’s Mail Channel Adapters.
|Defines the configuration elements for Spring Integration Redis Adapters and Channels.
|Defines the configuration elements for Spring Integration’s RMI adapters.
|Defines the configuration elements for Spring Integration SFTP Adapters.
|Defines the configuration elements for Spring Integration Stream-based Channel Adapters.
|Defines the configuration elements for Spring Integration’s Web Service adapters.
Page Visitors: 13242