Nov 8th, 2012, 04:17 PM
Understanding Spring Integration - Is it suitable for this?
Maybe its just the "enterprise" that is throwing me off, but I'm wondering if Spring Integration would be better for me instead of listeners/observers.
Basically I'm receiving events from an outside source. These could be syslog, a post from a web client, whatever.. This is already implemented. I pass each message (aka "event") to a list of observers to see if one knows what to do with it.
Would Spring integration allow me to "publish" this, and then my observers could instead become subscribers? They would then themselves need to be publishers, as their job is event normalization, and then pass on to some configurable destination.
I've been suggested Spring Integration for such patterns before, but never really went down this road. As an accidental Java developer, Spring was daunting at first.. But as I've really come to like it, I think its time to embrace it to its fullest.
Nov 8th, 2012, 04:22 PM
However instead of observers with some guarding rule in front (". . .to see if one knows what to do with it . . ."), you can have a router (which would be more appropriate from messaging/event perspective)
As far as how to get events into Spring Integration we have many inbound adapters (HTTP, FTP, XMPP, TCP/UDP etc), so check them out