Creating a Route - 6.2

Talend MDM Platform Studio User Guide

EnrichVersion
6.2
EnrichProdName
Talend MDM Platform
task
Data Governance
Data Quality and Preparation
Design and Development
EnrichPlatform
Talend Studio
  1. Create a Route and open it in the design workspace. For more information on how to do it, see How to create a Route .

  2. From the palette, drag and drop a cSetBody, and five cMessagingEndpoint components onto the design workspace. Label the components for better identification of their roles and link them together with the Row > Main connection.

Configuring the incoming sub-route

  1. Double-click the testMina component to open its Basic settings view in the Component tab.

  2. In the URI field, enter the code "timer:testOneWayMina?delay=1000&period=2000" to define a timer for starting message exchanges. In this use case, we want each message to be delivered after a 1-second delay at a period of 2 seconds.

  3. Double-click the initializeRequest component to open its Basic settings view in the Component tab.

  4. Select Constant from the Language list box and type in "test message\n" in the Expression field.

  5. Double-click the logRequest component to open its Basic settings view in the Component tab.

  6. In the URI field, enter "log:jobSocketIn" where the incoming message exchanges are logged.

  7. Double-click the jobSocketIn component and click Advanced settings view in the Component tab.

  8. In this use case, we will use the Camel component camel-mina as the transport. To use this component, click at the bottom of the Dependencies list to add a row and select mina from the drop-down list. For more information about Mina, see the site http://camel.apache.org/mina.html.

    Alternatively, you can use a cConfig component and add the library of MINA to the Dependencies list of the cConfig component. To do so, click at the bottom of the Dependencies list to add a row. Select this row and click the [...] button at the end to show the [Select Module] wizard.

    Select camel-mina-alldep-2.9.2.jar from the inner modules and click OK to add it to the Dependencies list.

  9. Click the Basic settings view in the Component tab of the jobSocketIn component. In the URI field, enter "mina:tcp://localhost:" + 8900 + "?textline=true&sync=false" to send the message to the Mina endpoint of a TCP service on port 8900 as a text line in the InOnly mode.

Configuring the outcoming sub-route

  1. Double-click the jobSocketOut component to open its Basic settings view in the Component tab.

  2. In the URI field, enter "mina:tcp://localhost:" + 8901 + "?textline=true&sync=false" of the outcoming socket port.

  3. Double-click the logResponse component to open its Basic settings view in the Component tab.

  4. In the URI field, enter "log:jobSocketOut" where the outcoming message exchanges are logged.

Press Ctrl+S to save your Route.