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

PollEnrich with file and option sendEmptyMessageWhenIdle keeps sending empty messages

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.7.5, 3.11.0
    • Fix Version/s: 3.7.6, 3.11.2, 3.12.0
    • Component/s: None
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      In the dev mailing list, Onder Sezgin 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

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

                Dates

                • Created:
                  Updated:
                  Resolved: