Spring Integration Tutorial (Part 3) – Filters

by | Aug 5, 2014

Part 3 – Filters

filter
So now you have an understanding of the channel and endpoint basics from Part 1 of our Spring Integration tutorial.  And you have studied a particular type of endpoint – the adapter in Part 2 in our Spring Integration tutorial series.  Time to look at another message endpoint – the filter.  Filters sit between message channels.

Filters allow, on the basis of a message’s content or metadata (in the message header), a message to pass from one channel to the next or reject and discard the message from the system – that is, not allowing the rejected message into the next channel. The filter is a “yea or nay” component determining which messages flow through and which messages do not.

filter-between-channels

In this third part of the tutorial series, you explore the types and configuration of filters provided by Spring Integration and how to create your own custom filter using a Spring Integration MessageSelector interface.

 

After watching the video, you are ready to take on the challenges of Lab 3 using Spring Integration Filters.

Lab3-Filters

Lab 3 code files

Missed other parts of the tutorial series? Check them out using the links below.

Spring Integration Introduction

Spring Integration Tutorial (Part 1) – Understanding Channels

Spring Integration Tutorial (Part 2) – Adapters

Spring Integration Tutorial (Part 3) – Filters

Spring Integration Tutorial (Part 4) – Transformers

Spring Integration Tutorial (Part 5) – Routers

Spring Integration Tutorial (Part 6) – Enrichers

Spring Integration Tutorial (Part 7) – Service Activators

Spring Integration Tutorial (Part 8) – Gateways