Posts

Showing posts from May, 2021

Spring Integration Routers LAB-13

Create a recipient list router: Recipient list routers are meant to disburse received messages to all of its outbound channels without regard for message header or payload content. If you will, a recipient list router simply blasts incoming messages to all the channels listed as “recipients.” In this step, you create a recipient router to route Norway ship orders to both a file adapter and a service activator that prints out information regarding the Norway ship order to the Console view. Add two new Norway message channels. There needs to be two new message channels to serve as recipients of the Norway messages. The first new channel will take messages that will ultimately be routed to the file system. The second new channel will receive messages that will ultimately be routed to the service activator. <int:channel id=”norwayFileChannel” /> <int:channel id=”norwaySAChannel” /> Change the File adapter for the Norway messages to now get its messages from the norwayFileChanne

Spring Integration Routers LAB-12

Image
Routers direct messages to an appropriate message channel typically based on what is in the payload or header of a message. Routers do not alter the message like a transformer. Routers don’t remove messages from the system like a filter can. They simply provide forks in the road of message channels in a Spring Integration (SI) application. In this lab, you explore a few commonly used SI routers. Specifically, in this lab you will: Configure and use an XPath router to route XML payload messages. Define a recipient router to send the same message to a collection of channels. Scenario – Route using XPath expression In previous filter Lab, we used XPath expressions in filters to remove or discard some XML messages from the system. In a similar fashion, as will be demonstrated in this part of the lab, an XPath router uses an XPath expression to determine which message channel receives a message containing XML in its payload. In particular, note that the application already contains an inbo