Double-click cFile to open its Basic settings view in the Component tab.
In the Path field, type in the path to
the source message, for example, "E:/data/input". Keep other default settings
unchanged.
Double-click cSetHeader to open its
Basic settings view in the Component tab.
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".
Double-click cRecipientList to open its
Basic settings view in the Component tab.
In the Language list, select Header.
In the Expression field, enter the name
of the header that contains the recipients list, that is, "ListOfRecipients".
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.
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"));
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 – please let us know!