Spring Integration Essentials
eBook - ePub

Spring Integration Essentials

Chandan Pandey

Share book
  1. 198 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Spring Integration Essentials

Chandan Pandey

Book details
Book preview
Table of contents
Citations

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Spring Integration Essentials an online PDF/ePUB?
Yes, you can access Spring Integration Essentials by Chandan Pandey in PDF and/or ePUB format, as well as other popular books in Computer Science & Web Programming. We have over one million books available in our catalogue for you to explore.

Information

Year
2015
ISBN
9781783989164

Spring Integration Essentials


Table of Contents

Spring Integration Essentials
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
How enterprise integration challenges can be solved
Who are the players?
Why Spring Integration?
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Getting Started
Setting up STS
Creating your first project
STS visual editor
Spring Integration Scala DSL
Summary
2. Message Ingestion
Working with message channels
Channel types
Spring implementation of channels
Selecting a channel
Publish-subscribe channel
Queue channel
Priority channel
Rendezvous channel
Direct channel
Executor channel
Scoped channel
Datatype channel
Error handling on channels
Persisting and recovering channels
Channel interceptors
Summary
3. Message Processing
Message endpoints
Gateways
Synchronous gateways
Asynchronous gateways
Service activators
Delayers
Transactions
Summary
4. Message Transformers
Introducing message transformers
Working with XML payload
The marshalling transformer
The unmarshalling transformer
XPath transformers
Validating XML messages
Beyond default transformers
Content enrichers
Header enrichers
Payload enrichers
Claim check
Incoming claim check transformer
Outgoing claim check transformer
Summary
5. Message Flow
Routers
Payload-type router
Header value router
Recipient list router
XPath router
Error message exception-type router
Default output channel
Using annotations
Filters
Using a Java class to act as a filter
Configuring a filter as a message endpoint
Splitters
Aggregators
Correlation strategy
Release strategy
Message store
Resequencers
Chaining handlers
Summary
6. Integration with External Systems
Working with files
Prerequisites
Reading files
Behind the scenes
Filters
Preventing duplicates
Concurrent access
Writing files
Naming the file
Target directory
Dealing with existing filenames
File transformers
FTP/FTPS
Prerequisites
Downloading files from the FTP server
Incomplete files
Uploading files to the FTP server
Avoiding partially written files
FTP outbound gateway
FTPS support
Social integration
Prerequisites
Receiving tweets
Sending tweets
Twitter search outbound gateway
Enterprise messaging
Prerequisites
Receiving messages – the inbound adapter
The polling adapter
The event-driven adapter
Sending messages – the outbound adapter
Gateway
The inbound gateway
The outbound gateway
HTTP
Prerequisites
The HTTP inbound gateway
The HTTP outbound gateway
Web services
Prerequisites
The inbound gateway
The outbound gateway
Database SQL
Prerequisites
Datasource
Reading from the database – the inbound adapter
Transaction support
Writing to the database – the outbound adapter
Inbound and outbound gateways
Stream processing
Prerequisites
Reading from a stream
Writing to a stream
Summary
7. Integration with Spring Batch
Spring Batch
Prerequisites
Defining a Spring Batch job
The Spring Batch job language
ItemReader
ItemWriter
Spring Batch and Spring Integration
Launching the job
Tracking the status of a batch job
The other way round
Summary
8. Testing Support
Prerequisite
Testing messages
Testing headers
Handling errors
Testing filters
Splitter test
Summary
9. Monitoring, Management, and Scaling Up
Monitoring and management
JMX support
Prerequisites
The notification listening channel adapter
The notification publishing channel adapter
The attribute polling channel adapter
The tree polling channel adapter
The operation invoking channel adapter
The operation invoking outbound gateway
The MBean exporter
Tracking the message
Wire tap
Control bus
Scaling up
Threading
Scaling the state
Message store
Claim check
Summary
10. An End-to-End Example
Prerequisites
Setting up
Ingesting data
Ingesting data from the RSS feed
Ingesting data from an FTP server
Filtering the data
The aggregator
The correlation bean
The completion bean
The aggregator bean
The splitter
Transformation
The DB transformer
The JMS transformer
The mail transformer
Router
Integration
Database integration
Prerequisites
The gateway
The service activator
Gateways for updating and reading the feeds
Sending a mail
Putting messages on to the JMS queue
Exporting as an MBean
Summary
Index

Spring Integration Essentials

Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: February 2015
Production reference: 1160215
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78398-916-4
www.packtpub.com

Credits

Author
Chandan Pandey
Reviewers
Marten Deinum
Biju Kunjummen
Xinyu Liu
Luca Masini
Commissioning Editor
Julian Ursell
Acquisition Editor
Richard Brookes-Bland
Content Development Editors
Sharvari Tawde
Ritika Singh
Technical Editor
Aman Preet Singh
Copy Editors
Roshni Banerjee
Pranjali Chury
Project Coordinator
Judie Jose
Proofreaders
Ameesha Green
Joanna McMahon
Indexer
Monica Ajmera Mehta
Production Coordinator
Nilesh R. Mohite
Cover Work
Nilesh R. Mohite

About the Author

Chandan Pandey is an Oracle Certified Enterprise architect with more than 10 years of experience in designing, coding, and delivering enterprise applications using various tools and technologies. He has always been amused by the power of software that reduces the boredom of repetitive tasks and introduces agility and efficiency. He firmly believes that tools, technology, and methodology are a medium to provide a solution and would like to be positioned as a solutions expert rather than limiting his identity to a framework or tool. This is reflected in the breadth and depth of his work; he is proficient not only in traditional languages and frameworks such as Java/JEE and Spring, but also in Groovy and Grails, Vaadin, and Play Framework, to name a few. His domain experi...

Table of contents