Getting Started with Spring Integration

If you have Maven installed:

  1. Download the samples
  2. Unzip them
  3. At the command line, cd into the samples dir and enter: mvn install
  4. In your IDE of choice, set up the project from the root pom

If you are familiar with Enterprise Integration Patterns, here are some of the patterns implemented in each sample:

Pattern / Sample Event Driven Consumer Polling Consumer Message Filter Message Translator Content Based Router Splitter Aggregator Channel Adapter Messaging Gateway Service Activator Request/Reply
cafe X X X X X X X X
filecopy X X X X
errorhandling X X X X
helloworld X X
jms X X X X X
oddeven X X X X X
quote X X X
ws X X X X
xml X X X X X X

From Mark Fisher’s Post:

*NOTE: All of the samples feature certain common patterns that are essential to the underlying Spring Integration core:

  • Message: Spring Integration Messages encapsulate a POJO payload and a header Map (Reference).
  • Message Channel: Spring Integration includes many Message Channel options for both point-to-point and publish-subscribe. Some include queues for buffering while others dispatch directly to subscribers (Reference).
  • Message Endpoint: At a high level, this includes all components that connect to channels for input and/or output.
  • Messaging Mapper: Spring Integration binds inbound Messages to method arguments and method return values to Message payloads and/or headers.
  • Message Dispatcher: In Spring Integration, channels that do not have a queue use Message Dispatchers to invoke their subscribers.
  • Pipes and Filters: This is the most general pattern describing Message-processing components connected in a loosely-coupled way via channels.
  • Message Bus: Spring Integration essentially turns a Spring ApplicationContext into a lightweight Message Bus within which all of these other components are hosted.


Leave a Reply