Configuring the incoming sub-route - 7.1

Data Service and Routing Examples

author
Talend Documentation Team
EnrichVersion
7.1
EnrichProdName
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
task
Design and Development > Designing Routes
Design and Development > Designing Services
EnrichPlatform
Talend Studio

Procedure

  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.