Configuring how the message is processed - 7.3

Amazon SNS (Mediation)

Version
7.3
Language
English
Product
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
Module
Talend Studio
Content
Data Governance > Third-party systems > Amazon services (Mediation) > Amazon SNS components (Mediation)
Data Quality and Preparation > Third-party systems > Amazon services (Mediation) > Amazon SNS components (Mediation)
Design and Development > Third-party systems > Amazon services (Mediation) > Amazon SNS components (Mediation)
Last publication date
2023-06-12

Procedure

  1. Configure the cAWSConnection using the same properties as in the producer Route.
  2. Double-click the cAWSS3 component to display its Basic settings view in the Component tab.
  3. In the Connection list, select the cAWSConnection component to connect to Amazon's S3 service.
    In the Bucket Name field, enter the name of the bucket that contains the file to be consumed, "talend-s3-demo" in this use case.
    In the File Name field, enter the name of the file, "talend.txt".
    Clear the Delete After Read check box to keep the S3 object file after it is consumed.
  4. Double-click the cProcessor component to display its Basic settings view in the Component tab.
  5. In the Code box, enter the following code to print the file name and its content in the execution console:BufferedReader br = new BufferedReader(new InputStreamReader((InputStream) exchange.getIn().getBody())); System.out.println("FileName: "+exchange.getIn().getHeader("CamelAwsS3Key")+" Content: " + br.readLine()); br.close();
  6. Press Ctrl+S to save your Route.