At its core, Spring Integration defines an API for messaging and a corresponding data model. The abstraction provided by that API and model essentially serves as a lightweight messaging framework that can be used in any runtime environment from a full-blown application server to a simple main method within a Java class that’s executed from a command line or within an IDE.
A messaging framework can be quite useful even in standalone applications that don’t require complex system integration. For example, the core enterprise integration patterns can be used to construct a pipeline of filters, transformers, and routers that all run within a single process. With the growing interest in asynchronous event-driven applications, that pipeline design might be a good match for many of your applications.
This book recognizes the value of the core messaging patterns not only as building blocks for system integration but also as a set of components that can facilitate standalone message-driven applications of a much smaller scale. The first two parts of the book, “Background” and “Messaging,” consist of seven chapters that are relevant for either type of application. The third part, “Integrating systems,” includes six chapters that build upon that core knowledge while demonstrating the most common messaging adapters for assembling distributed applications and integrating various data and messaging systems. The fourth and final part of the book, “Advanced topics,” provides another five chapters covering practical concerns for those using the framework in real-world applications.
Throughout this book, we hope you’ll find that the depth of content goes well beyond the practical concerns of the framework’s usage as it ventures into the concepts behind the patterns and the decisions to consider when applying those patterns to the design of your applications.
Part 1: Background
Part 2: Messaging
Part 3: Integrating systems
Part 4: Advanced topics
One of the main design goals of Spring Integration is to make enterprise application integration (EAI) accessible in a wide variety of use cases. Instead of a heavyweight infrastructure requiring the setup of an external integration bus and the use of specialized utilities and tools, Spring Integration builds on top of the Spring Framework and allows the inclusion of its components and concepts directly inside applications, reusing a wide array of skills and tools developers already have, like their knowledge of Java or Spring.
In a similar way, this book intends to be a companion and guide to anyone who needs to incorporate integration aspects in their applications. EAI experts will find a hands-on overview of how the concepts with which they’re already familiar materialize in the design and features of the framework. Nonspecialists, developers, and architects who need to solve specific integration problems will find a set of useful concepts and patterns described from a pragmatic, example-driven perspective. Managers will better understand the challenges inherent within the solutions whose development they supervise and, at the same time, the opportunities that the framework offers.
This book addresses an audience with varying degrees of familiarity with EAI, Spring, or even Spring Integration itself. Prior knowledge of any of these would surely help you connect the dots with greater ease, but isn’t required. The book introduces basic background concepts before discussing more advanced topics. Conversely, existing familiarity with any of these topics should detract little from the enjoyment of the book; this deep dive into technical details and best practices will provide a lot to take away.
All source code in listings or in the text is in a fixed-width font like this to separate it from ordinary text. Code annotations accompany some of the listings, highlighting important concepts. In most cases, numbered bullets link to explanations that follow in the text. You can download the source code for this book from the publisher’s website at www.manning.com/SpringIntegrationinAction.
Although this book project was initiated when Spring Integration was at version 1.0, we ended up making changes throughout to keep up with the latest major version of the framework: 2.0. In fact, our code sample repository actually uses the latest minor version, 2.1, which is a superset of 2.0.
You may notice that we use different approaches in XML schema namespace prefixes across the many configuration examples in the book. Sometimes we prefix namespaces with just the name of the type of adapter being configured (e.g., <mail:outbound-channel-adapter>), and other times the prefix is further qualified with an indicator that it’s for integration (e.g., <int-http:inbound-gateway>). The latter option helps avoid conflicts with other common uses of the unqualified prefix, as could clearly cause confusion in the case of the prefix http:. In yet other cases, we specify the integration namespace as the base namespace of the XML file itself so that no prefix is necessary for the components defined within that schema (e.g., <channel>). That’s typically done when it’s the Spring Integration “core” namespace in question, and in those examples, you’ll often see an explicit prefix for the Spring beans namespace (e.g., <beans:bean>). We wanted to point out these differences here, so that you aren’t confused when you encounter them. In the real world, you’ll likely stumble upon a wide variety of prefixes, so it actually helps to be accustomed to seeing a reflection of that in the book examples.
Finally, we want to clarify an approach we’ve taken to the occurrence of enterprise integration pattern names within this book. The first occurrence of a pattern name will typically be capitalized and/or italicized (e.g., Control Bus). Once the context is established for a given pattern, it will occur in regular text throughout the book. The pattern names appear so frequently in the book, we decided it was distracting to constantly use capitalization.
18.116.60.62