Spring Integration Reference Manual


Mark Fisher, Marius Bogoevici, Iwein Fuld, Jonas Partner, Oleg Zhurakousky, Gary Russell, Dave Syer, Josh Long, David Turanski, Gunnar Hillert, Artem Bilan, Amol Nayak


Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically.

Table of Contents

I. Preface
1. Compatible Java Versions
2. Compatible Versions of the Spring Framework
3. Code Conventions
1. Conventions in this Book
II. What’s new?
2. What’s new in Spring Integration 4.3?
2.1. New Components
2.1.1. AMQP Async Outbound Gateway
2.1.2. MessageGroupFactory
2.1.3. PersistentMessageGroup
2.1.4. FTP/SFTP Streaming Inbound Channel Adapters
2.1.5. Stream Transformer
2.1.6. Integration Graph
2.1.7. JDBC Lock Registry
2.1.8. Leader Initiator for Lock Registry
2.2. General Changes
2.2.1. Core Changes
Outbound Gateway within Chain
Async Service Activator
Messaging Annotation Support changes
Lifecycle Role Controller
2.2.2. Mail Changes
Customizable User Flag
Mail Message Mapping
2.2.3. JMS Changes
Header Mapper
Async Gateway
2.2.4. Aggregator Changes
2.2.5. TCP/UDP Changes
Stream Deserializers
TCP Message Mapper
2.2.6. File Changes
Destination Directory Creation
Buffer Size
Appending and Flushing
Preserving Timestamps
Splitter Changes
File Filters
2.2.7. AMQP Changes
Content Type Message Converter
Headers for Delayed Message Handling
AMQP-Backed Channels
2.2.8. Redis Changes
List Push/Pop Direction
Queue Inbound Gateway Default Serializer
2.2.9. HTTP Changes
2.2.10. SFTP Changes
Factory Bean
Inbound Channel Adapter
2.2.11. FTP Changes
Session Changes
Inbound Channel Adapter
2.2.12. Router Changes
2.2.13. Header Mapping
AMQP Header Mapping
2.2.14. Groovy Scripts
2.2.15. @InboundChannelAdapter
2.2.16. XMPP changes
2.2.17. WireTap Late Binding
2.2.18. ChannelMessageStoreQueryProvider
2.2.19. WebSocket Changes
2.2.20. Barrier Changes
2.2.21. AMQP Changes
III. Overview of Spring Integration Framework
3. Spring Integration Overview
3.1. Background
3.2. Goals and Principles
3.3. Main Components
3.3.1. Message
3.3.2. Message Channel
3.3.3. Message Endpoint
3.4. Message Endpoints
3.4.1. Transformer
3.4.2. Filter
3.4.3. Router
3.4.4. Splitter
3.4.5. Aggregator
3.4.6. Service Activator
3.4.7. Channel Adapter
3.5. Configuration and @EnableIntegration
3.6. Programming Considerations
3.7. Considerations When using Packaged (e.g. Shaded) Jars
3.8. Programming Tips and Tricks
IV. Core Messaging
4. Messaging Channels
4.1. Message Channels
4.1.1. The MessageChannel Interface
4.1.2. Message Channel Implementations
Scoped Channel
4.1.3. Channel Interceptors
4.1.4. MessagingTemplate
4.1.5. Configuring Message Channels
DirectChannel Configuration
Datatype Channel Configuration
QueueChannel Configuration
PublishSubscribeChannel Configuration
PriorityChannel Configuration
RendezvousChannel Configuration
Scoped Channel Configuration
Channel Interceptor Configuration
Global Channel Interceptor Configuration
Wire Tap
Conditional Wire Taps
Global Wire Tap Configuration
4.1.6. Special Channels
4.2. Poller
4.2.1. Polling Consumer
4.2.2. Pollable Message Source
4.2.3. Conditional Pollers for Message Sources
"Smart" Polling
4.3. Channel Adapter
4.3.1. Configuring An Inbound Channel Adapter
4.3.2. Configuring An Outbound Channel Adapter
4.3.3. Channel Adapter Expressions and Scripts
4.4. Messaging Bridge
4.4.1. Introduction
4.4.2. Configuring Bridge
5. Message Construction
5.1. Message
5.1.1. The Message Interface
5.1.2. Message Headers
MessageHeaderAccessor API
Message ID Generation
Read-only Headers
Header Propagation
5.1.3. Message Implementations
5.1.4. The MessageBuilder Helper Class
6. Message Routing
6.1. Routers
6.1.1. Overview
6.1.2. Common Router Parameters
Inside and Outside of a Chain
Top-Level (Outside of a Chain)
6.1.3. Router Implementations
XPath Router
Routing and Error handling
6.1.4. Configuring (Generic) Router
Configuring a Content Based Router with XML
Configuring a Router with Annotations
6.1.5. Dynamic Routers
Manage Router Mappings using the Control Bus
Manage Router Mappings using JMX
Routing Slip
Process Manager Enterprise Integration Pattern
6.2. Filter
6.2.1. Introduction
6.2.2. Configuring Filter
Configuring a Filter with XML
Configuring a Filter with Annotations
6.3. Splitter
6.3.1. Introduction
6.3.2. Programming model
6.3.3. Configuring Splitter
Configuring a Splitter using XML
Configuring a Splitter with Annotations
6.4. Aggregator
6.4.1. Introduction
6.4.2. Functionality
6.4.3. Programming model
Aggregating Large Groups
6.4.4. Configuring an Aggregator
Configuring an Aggregator with XML
Configuring an Aggregator with Annotations
6.4.5. Managing State in an Aggregator: MessageGroupStore
6.5. Resequencer
6.5.1. Introduction
6.5.2. Functionality
6.5.3. Configuring a Resequencer
6.6. Message Handler Chain
6.6.1. Introduction
6.6.2. Configuring a Chain
6.7. Scatter-Gather
6.7.1. Introduction
6.7.2. Functionality
6.7.3. Configuring a Scatter-Gather Endpoint
6.8. Thread Barrier
7. Message Transformation
7.1. Transformer
7.1.1. Introduction
7.1.2. Configuring Transformer
Configuring Transformer with XML
Common Transformers
Configuring a Transformer with Annotations
7.1.3. Header Filter
7.1.4. Codec-Based Transformers
7.2. Content Enricher
7.2.1. Introduction
7.2.2. Header Enricher
Configuring a Header Enricher with Java Configuration
Configuring a Header Enricher with the Java DSL
Header Channel Registry
7.2.3. Payload Enricher
7.3. Claim Check
7.3.1. Introduction
7.3.2. Incoming Claim Check Transformer
7.3.3. Outgoing Claim Check Transformer
7.3.4. A word on Message Store
7.4. Codec
7.4.1. Introduction
7.4.2. EncodingPayloadTransformer
7.4.3. DecodingTransformer
7.4.4. CodecMessageConverter
7.4.5. Kryo
Customizing Kryo
8. Messaging Endpoints
8.1. Message Endpoints
8.1.1. Message Handler
8.1.2. Event Driven Consumer
8.1.3. Polling Consumer
8.1.4. Namespace Support
8.1.5. Change Polling Rate at Runtime
8.1.6. Payload Type Conversion
8.1.7. Asynchronous polling
8.1.8. Endpoint Inner Beans
8.2. Endpoint Roles
8.3. Leadership Event Handling
8.4. Messaging Gateways
8.4.1. Enter the GatewayProxyFactoryBean
8.4.2. Gateway XML Namespace Support
8.4.3. Setting the Default Reply Channel
8.4.4. Gateway Configuration with Annotations and/or XML
8.4.5. Mapping Method Arguments to a Message
8.4.6. @MessagingGateway Annotation
8.4.7. Invoking No-Argument Methods
8.4.8. Error Handling
8.4.9. Asynchronous Gateway