This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

AnnouncementAnnouncement Module

Collapse

No announcement yet.

Understanding Spring Integration - Is it suitable for this?Page Title Module

Understanding Spring Integration - Is it suitable for this?

Nov 8th, 2012, 04:17 PM

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.

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