Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-13292

Camel-AWS S3: Adding consumer endpoints to polling components

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0-M2, 3.0.0
    • None
    • None
    • Unknown

    Description

      When camel is used in serverless world using camel-k, we need to start the routes as consumers of `knative` component.

      The following code gets the s3 file name as an event payload from a source , but currently i cant use `s3` consumer to download the file and say log it as there is no consumer available in s3 component that can do it , if I make it from to be form s3 component then it becomes non-severless component i.e. not autoscalable. This pattern will be quite common in enterprise world and when using camel with serverless; hence its great to have consumers for all polling components to be used with knative/serverless scenarios.

      e.g.

      from("knative:endpoint/s3filelogger") .log("Downloading file: ${in.header.fileName}") .setHeader(S3Constants.KEY,simple("${in.header.fileName}")) .toD("aws-s3://data?fileName=${in.header.CamelAwsS3Key}&deleteAfterRead=false") .idempotentConsumer(header("CamelAwsS3ETag"), idmRepo()) //just sending the response back to the callee .process(this::sendResponse) .end();  

       

      Attachments

        Activity

          People

            acosentino Andrea Cosentino
            kameshsampath Kamesh Sampath
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: