Skip to main content Skip to complementary content

Configuring the components

Procedure

  1. Double-click cFile to open its Basic settings view in the Component tab.
  2. In the Path field, type in the path to the source message, for example, "E:/data/input". Keep other default settings unchanged.
  3. Double-click cSetHeader to open its Basic settings view in the Component tab.
  4. Click [+] to add a row to the Headers table.
    In the Name field, enter the header name, for example, "ListOfRecipients".
    In the Language list, select Constant.
    In the Value field, enter the endpoint URIs, for example, "direct:a,direct:b".
  5. Double-click cRecipientList to open its Basic settings view in the Component tab.
  6. In the Language list, select Header.
    In the Expression field, enter the name of the header that contains the recipients list, that is, "ListOfRecipients".
  7. Double-click Recipient_A to open its Basic settings view in the Component tab and define the URI of recipient A.
    Perform the same operation to Recipient_B to define the URI of recipient B.
  8. Double-click Print_File_Name_A to open its Basic settings view in the Component tab and enter the code below to print out the message received by Recipient_A.System.out.println("Recipient_a just downloaded:"+exchange.getIn().getHeader("CamelFileName"));
    Perform the same operation to Print_File_Name_B and type in the code below in its code box:
    System.out.println("Recipient_b just downloaded:"+exchange.getIn().getHeader("CamelFileName"));
  9. Press Ctrl+S to save your Route.

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!