spring integration reference manual - spring .spring integration reference manual 5.0.6.release...

Download Spring Integration Reference Manual - Spring .Spring Integration Reference Manual 5.0.6.RELEASE Spring

Post on 30-Aug-2018

352 views

Category:

Documents

16 download

Embed Size (px)

TRANSCRIPT

  • Spring Integration Reference Manual

    5.0.7.RELEASE

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

  • Copyright 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 Pivotal Software, Inc. All Rights Reserved.

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

  • Spring Integration Reference Manual

    5.0.7.RELEASE Spring Integration iii

    Table of Contents

    I. Preface ................................................................................................................................... 1Requirements ..................................................................................................................... ii

    1. Compatible Java Versions ....................................................................................... ii2. Compatible Versions of the Spring Framework ......................................................... ii3. Code Conventions .................................................................................................. ii

    1. Conventions in this Book ................................................................................................ 3II. Whats new? .......................................................................................................................... 4

    2. Whats new in Spring Integration 5.0? ............................................................................. 52.1. New Components ................................................................................................ 5

    Java DSL ........................................................................................................... 5Testing Support .................................................................................................. 5MongoDB Outbound Gateway ............................................................................. 5WebFlux Gateways and Channel Adapters .......................................................... 5Content Type Conversion ................................................................................... 5ErrorMessagePublisher and ErrorMessageStrategy .............................................. 5JDBC Metadata Store ........................................................................................ 5

    2.2. General Changes ................................................................................................ 6Core Changes .................................................................................................... 6Gateway Changes .............................................................................................. 7Aggregator Performance Changes ...................................................................... 7Splitter Changes ................................................................................................ 7JMS Changes .................................................................................................... 7Mail Changes ..................................................................................................... 7Feed Changes ................................................................................................... 8File Changes ..................................................................................................... 8(S)FTP Changes ................................................................................................ 8Integration Properties ......................................................................................... 9Stream Changes ................................................................................................ 9Barrier Changes ................................................................................................. 9AMQP Changes ................................................................................................. 9HTTP Changes ................................................................................................ 10MQTT Changes ................................................................................................ 10STOMP Changes ............................................................................................. 10Web Services Changes .................................................................................... 10Redis Changes ................................................................................................ 10TCP Changes .................................................................................................. 11Gemfire Changes ............................................................................................. 11Jdbc Changes .................................................................................................. 11Metrics Changes .............................................................................................. 11@EndpointId Annotations .................................................................................. 11Integration Flows: Generated bean names ......................................................... 12

    III. Overview of Spring Integration Framework ............................................................................ 133. Spring Integration Overview .......................................................................................... 14

    3.1. Background ....................................................................................................... 143.2. Goals and Principles .......................................................................................... 143.3. Main Components ............................................................................................. 15

    Message .......................................................................................................... 15

  • Spring Integration Reference Manual

    5.0.7.RELEASE Spring Integration iv

    Message Channel ............................................................................................ 15Message Endpoint ............................................................................................ 16

    3.4. Message Endpoints ........................................................................................... 16Transformer ..................................................................................................... 17Filter ................................................................................................................ 17Router .............................................................................................................. 17Splitter ............................................................................................................. 17Aggregator ....................................................................................................... 18Service Activator .............................................................................................. 18Channel Adapter .............................................................................................. 19Endpoint Bean Names ...................................................................................... 19

    3.5. Configuration and @EnableIntegration ................................................................ 223.6. Programming Considerations .............................................................................. 233.7. Considerations When using Packaged (e.g. Shaded) Jars .................................... 233.8. Programming Tips and Tricks ............................................................................. 25

    XML Schemas .................................................................................................. 25Finding Class Names for Java and DSL Configuration ........................................ 26

    3.9. POJO Method invocation ................................................................................... 28IV. Core Messaging .................................................................................................................. 30

    4. Messaging Channels .................................................................................................... 314.1. Message Channels ............................................................................................ 31

    The MessageChannel Interface ......................................................................... 31PollableChannel ....................................................................................... 31SubscribableChannel ................................................................................ 31

    Message Channel Implementations ................................................................... 31PublishSubscribeChannel .......................................................................... 32QueueChannel ......................................................................................... 32PriorityChannel ......................................................................................... 32RendezvousChannel ................................................................................. 33DirectChannel .......................................................................................... 33ExecutorChannel ...................................................................................... 34Scoped Channel ....................................................................................... 35

    Channel Inter