Karen Lease created CAMEL-16874:
-----------------------------------
Summary: PollEnrich with file and option sendEmptyMessageWhenIdle
keeps sending empty messages
Key: CAMEL-16874
URL: https://issues.apache.org/jira/browse/CAMEL-16874
Project: Camel
Issue Type: Bug
Affects Versions: 3.11.0
Reporter: Karen Lease
Assignee: Karen Lease
In [the dev mailing
list|https://lists.apache.org/thread.html/r401e672505d0585818012a87640942083abed966e6d765f5b7313b3a%40%3Cdev.camel.apache.org%3E],
[~onders] reported an issue using pollEnrich in combination with a REST
request to upload files.
{code}
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();
{code}
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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)