Recently I was playing around with Spring Integration. To understand any new framework one cannot just rely on documentation. So I created a demo application to try out different features of the framework. Since my main motivation was to understand Spring Integration framework, I wanted to spend minimal efforts in input data generation. So I decided to work with Twitter messages.

Most of you must be familiar with Twitter. Twitter is a service for friends, family, and co–workers to communicate and stay connected through the exchange of quick, frequent messages. There are different clients available to use Twitter. In the sample application, I first read the friends timeline. Then based on the source/client used for tweeting, the tweets are routed to different channels. The tweets originated from “web” are simply logged, while the tweets originated from “Dzone.com” are dispatched using a mail sender. The basic flow of the application is depicted in the following diagram.
Continue reading “Using Spring Integration with Twitter4J to Email Tweets”