Book Image

Spring Integration Essentials

By : CHANDAN K PANDEY
Book Image

Spring Integration Essentials

By: CHANDAN K PANDEY

Overview of this book

This book is intended for developers who are either already involved with enterprise integration or planning to venture into the domain. Basic knowledge of Java and Spring is expected. For newer users, this book can be used to understand an integration scenario, what the challenges are, and how Spring Integration can be used to solve it. Prior experience of Spring Integration is not expected as this book will walk you through all the code examples.
Table of Contents (18 chapters)
Spring Integration Essentials
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Transformation


Now that we have feeds in the RSS format, let's transform it to appropriate formats so that the endpoints responsible for persisting in the database, putting it on the JMS channel, and sending it as a mail, can understand that. The splitter will put one message at a time on the channel splittedFeedChannel. Let's declare this as a pub-sub channel and attach three endpoints, which will be our transformers. Configure the pub-sub channel as follows:

<int:publish-subscribe-channel id="splittedFeedChannel"/>

The configuration for the three transformers that we have used is as follows:

  <bean id="feedDbTransformerBean" class="com.cpandey.siexample.transformer.SoFeedDbTransformer" />

  <bean id="feedJMSTransformerBean" class="com.cpandey.siexample.transformer.SoFeedJMSTransformer" />

  <bean id="feedMailTransformerBean" class="com.cpandey.siexample.transformer.SoFeedMailTransformer" />

The DB transformer

Let's write the transformer component from the Spring Integration...