Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Spring Integration Essentials
  • Table Of Contents Toc
  • Feedback & Rating feedback
Spring Integration Essentials

Spring Integration Essentials

By : CHANDAN K PANDEY
2.7 (3)
close
close
Spring Integration Essentials

Spring Integration Essentials

2.7 (3)
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 (12 chapters)
close
close
11
Index

Filters


Message filters are Spring Integration components, which act as an interceptor and decide whether to pass on the message to the next channel/component or drop it. Unlike routers, which decide what should be the next channel for a message, filters only take a boolean decision—whether to pass or not. There are two ways to define a message filter in Spring Integration:

  • Write a simple Java class and designate its method that will take decisions whether to pass the message or not

  • Configure it as a message endpoint that delegates to an implementation of the MessageSelector interface

This can be configured either in XML or annotations can be used.

Using a Java class to act as a filter

Let's take an example of using a simple Java class as a filter—this is part of our example about feeds. As feeds come in, we try to validate whether the payload is empty or not—then only pass it on for further processing:

<int:filter 
  input-channel="fetchedFeedChannel" 
  output-channel="filteredFeedChannel...
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Spring Integration Essentials
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon