Noo, i think i was wrong in my previous email.

exactly the same thing is happening in consumer/producer template way.

it is not working as it was expected.

On Thu, Aug 5, 2021 at 4:22 PM Onder SEZGIN <ondersez...@gmail.com> wrote:

> Hi,
>
> My question should have been placed in users list in the first place sorry
> for the confusion caused in dev list possibly.
> Anyway i was able to get over such issue with Consumer/Producer templates.
>
> I would expect pollEnrich would the same though but it did not.
> i will check that later.
>
> Hope it helps.
>
> Thanks
>
> On Thu, Aug 5, 2021 at 12:48 PM Onder SEZGIN <ondersez...@gmail.com>
> wrote:
>
>> extra info:
>>
>> it keeps logging No files found.. skipping to send to S3
>> which possibly means that file is not getting picked up.
>> and
>> camel version is 3.7.5
>>
>> thanks
>>
>> On Thu, Aug 5, 2021 at 12:17 PM Onder SEZGIN <ondersez...@gmail.com>
>> wrote:
>>
>>> Hello,
>>>
>>> After a while i am taking a ride with newer versions of camel, and i
>>> have a usecase to create a restful endpoint which will trigger uploading a
>>> file from a preconfigured directory to s3 bucket.
>>>
>>> so below if we endpoint is called and there is no file in the directory
>>> it logs nothing to upload but later if i place a file under the directory
>>> and make an api call to upload endpoint again, it does not pick up the file?
>>>
>>> Any idea is appreciated, i kind of doubt about default aggregation part
>>> of pollEnrich pattern but i am not sure.
>>>
>>> Thanks
>>> Onder
>>>
>>> rest()
>>>         .path("/v1/upload")
>>>         .consumes("application/json")
>>>         .produces("application/text")
>>>         .post()
>>>         .type(Void.class)
>>>         .to("direct:uploadFiles");
>>>
>>> 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();
>>>
>>>

Reply via email to