August 16, 2023

Configuring the first sub-route – Docs for ESB 6.x

Configuring the first sub-route

  1. Double-click the URLlist component to
    display its Basic settings view in the
    Component tab.

    use_case-ccontentenricher2.png

  2. In the Path field, browse to the file
    path where the URL list file is saved.

    In the FileName field, enter the filename
    URLlist.txt.
  3. Double-click the cSplitter component to
    display its Basic settings view in the
    Component tab.

    use_case-ccontentenricher3.png

  4. Select None in the Language list. In the Expression field, enter the code
    body(String.class).tokenize("
    ")
    to split the message in
    each row into sub-messages.

    Note:

    Note that this piece of code is for Windows only. For Unix, change it
    to body(String.class).tokenize("
    ")
    , and for Mac,
    body(String.class).tokenize("
    ")
    .

  5. Double-click the cJavaDSLProcessor component to display its Basic settings view in the Component tab.

    use_case-ccontentenricher4.png

  6. In the Code area, enter the code
    .log("splitterOutput: ${body}") to get the split message
    body.
  7. Double-click the cContentEnricher component display its Basic settings view in the Component tab.

    use_case-ccontentenricher5.png

  8. Select using a producer to use a producer
    to provide additional data and send the message to a defined URI.

    In the Resource URI field, enter
    "direct:fetchURL" where the message will be delivered.
  9. Double-click the setFileName
    component to display its Basic settings
    view in the Component tab.

    use_case-ccontentenricher6.png

  10. Click [+] to add a row to the Headers table.

    In the Name field, enter
    org.apache.camel.Exchange.FILE_NAME to define the file name
    for each incoming message.
    Select Simple in the Language list.
    In the Value field, enter
    "${header.CamelHttpPath}" to get the URI’s path of the
    incoming message.
  11. Double-click the retrievedFiles component
    to display its Basic settings view in the
    Component tab.

    use_case-ccontentenricher7.png

  12. In the Path field, browse to the
    destination file path where you want the messages to be saved.

Document get from Talend https://help.talend.com
Thank you for watching.
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x