aspose file tools
The moose likes Spring and the fly likes Content Enricher pattern in Spring Integration? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Application Frameworks » Spring
Reply Bookmark "Content Enricher pattern in Spring Integration?" Watch "Content Enricher pattern in Spring Integration?" New topic
Author

Content Enricher pattern in Spring Integration?

Arjumand Bonhomme
Greenhorn

Joined: Feb 28, 2007
Posts: 6
I'm using SI 2.0.03 and I was wondering is there any explicit support in SI for the Content Enricher pattern, when the message payload is the target of the enrichment?

Some googling (http://camel.apache.org/content-enricher.html) showed that when using Camel this can be accomplished with the "enrich" element element (or "enrich" method when using the dsl) and a custom AggregrationStrategy instance.

I know that SI has explicit support for message header enrichment, but I haven't seen anything targeted at the payload.
This post (http://forum.springsource.org/showthread.php?t=101639) on the Spring Forums suggest that while there is not explicit support for this pattern, that there are probably multiple approaches to accomplishing the same thing (service activator, custom/overloaded header enricher, custom transformer, etc.)

If there isn't any explicit support for payload enrichment, what approach would you recommend?
Also, are you aware if there are any plans for adding this to a future release of SI?

I used a custom transformer, but would have preferred it be more obvious that I was doing an "enrichment" and not just a transform. And while I haven't used Camel yet, I liked that their approach also allows you to retrieve the "enrichment" data via uniform constructs within the framework (ie resource endpoints).


Thanks!

Congrats on the new Pro Spring Integration book! :-)
Mark Lui
author
Greenhorn

Joined: Mar 25, 2011
Posts: 14
Arjumand,

The transformer component is for payload transformation or enrichment.

Mark


Mark Lui
http://drmarklui.wordpress.com
 
 
subject: Content Enricher pattern in Spring Integration?
 
Threads others viewed
Regd JmsSendingMessageHandler (Spring Integration)
Proper Use of Splitter Pattern in Spring Integration?
Camel vs Spring Integration
"Camel in Action" question
Camel vs Spring Integration. Part 2.
jQuery in Action, 2nd edition

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture