Skip to main content Skip to complementary content
Close announcements banner

Configuring the incoming sub-route

Procedure

  1. Double-click the testMina component to open its Basic settings view in the Component tab.
    Basic settings view.
  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.
    Basic settings view.
  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.
    Basic settings view.
  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.
    Advanced settings view.
  8. In this use case, we will use the Camel component camel-mina as the transport. To use this component, click Plus 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 Camel Apache documentation.
    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 Plus 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.
    Basic settings view.
    Select camel-mina-alldep-2.9.2.jar from the inner modules and click OK to add it to the Dependencies list.
    Select Module wizard.
  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.
    Basic settings view.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!