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

PollEnrich with file and option sendEmptyMessageWhenIdle keeps sending empty messages

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.7.5, 3.11.0
    • 3.7.6, 3.11.2, 3.12.0
    • None
    • None
    • Unknown

    Description

      In the dev mailing list, onders reported an issue using pollEnrich in combination with a REST request to upload files.

      from("direct:uploadFiles")
              .pollEnrich("file:{{shared-folder}}?include=.*.gz&delete=true&sendEmptyMessageWhenIdle=true")
              .choice()
                .when(body().isNull()).log("No files found.. skipping to send to S3")
                .otherwise().to("direct:toAwsS3")
              .endChoice();
      

      If the shared-folder contained no file, the empty event was sent, but when a file was then put in the folder, the empty event was still sent on the next rest request.

      Attachments

        Issue Links

          Activity

            People

              klease78 Karen Lease
              klease78 Karen Lease
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: