You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by CASAUX Nicolas <ni...@soprasteria.com> on 2020/09/19 09:46:50 UTC
pollEnrich and timeout issue
Hello !
I'm trying to use this simple route with Camel 3.4.3 and springboot :
from("timer:hello?repeatCount=1&delay=1000").routeId("hello")
.to("log:1")
.pollEnrich("file:d:\\temp?noop=true&fileName=dummy.csv",5000)
.to("log:2");
I run it without the file dummy.csv, to test the timeout option.
The timeout functionality does not seem to work, as you can see in the log, there's no delay between log1 and log2:
2020-09-19 11:39:30.099 INFO 186564 --- [- timer://hello] 1 : Exchange[ExchangePattern: InOnly, BodyType: null, Body: [Body is null]]
2020-09-19 11:39:30.107 INFO 186564 --- [- timer://hello] o.a.camel.component.file.FileEndpoint : Endpoint is configured with noop=true so forcing endpoint to be idempotent as well
2020-09-19 11:39:30.107 INFO 186564 --- [- timer://hello] o.a.camel.component.file.FileEndpoint : Using default memory based idempotent repository with cache max size: 1000
2020-09-19 11:39:30.208 INFO 186564 --- [- timer://hello] 2 : Exchange[ExchangePattern: InOnly, BodyType: null, Body: [Body is null]]
However, with Camel 2.24.3 It seems to work as expected as we can see the 5 sec delay between log1 and log2:
2020-09-19 11:38:50.242 INFO 151696 --- [- timer://hello] 1 : Exchange[ExchangePattern: InOnly, BodyType: null, Body: [Body is null]]
2020-09-19 11:38:50.244 INFO 151696 --- [- timer://hello] o.a.camel.processor.interceptor.Tracer : ID-ITEM-S74991-1600508328077-0-1 >>> (hello) log://1 --> pollEnrich[constant{file:d:\temp?noop=true&fileName=dummy.csv}] <<< Pattern:InOnly, Headers:{breadcrumbId=ID-ITEM-S74991-1600508328077-0-1, firedTime=Sat Sep 19 11:38:50 CEST 2020}, BodyType:null, Body:[Body is null]
2020-09-19 11:38:50.259 INFO 151696 --- [- timer://hello] o.a.camel.component.file.FileEndpoint : Endpoint is configured with noop=true so forcing endpoint to be idempotent as well
2020-09-19 11:38:50.259 INFO 151696 --- [- timer://hello] o.a.camel.component.file.FileEndpoint : Using default memory based idempotent repository with cache max size: 1000
2020-09-19 11:38:55.355 INFO 151696 --- [- timer://hello] o.a.camel.processor.interceptor.Tracer : ID-ITEM-S74991-1600508328077-0-1 >>> (hello) pollEnrich[constant{file:d:\temp?noop=true&fileName=dummy.csv}] --> log://2 <<< Pattern:InOnly, Headers:{breadcrumbId=ID-ITEM-S74991-1600508328077-0-1, CamelToEndpoint=file://d:%5Ctemp?fileName=dummy.csv&noop=true, firedTime=Sat Sep 19 11:38:50 CEST 2020}, BodyType:null, Body:[Body is null]
2020-09-19 11:38:55.355 INFO 151696 --- [- timer://hello] 2 : Exchange[ExchangePattern: InOnly, BodyType: null, Body: [Body is null]]
Is there a bug in Camel 3 with this or I'm missing something ?
Thanks in advance.
Nicolas
Re: pollEnrich and timeout issue
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
Yeah that smells like something is wrong. I assume there was no file
in that folder.
You can create a JIRA
On Sat, Sep 19, 2020 at 11:47 AM CASAUX Nicolas
<ni...@soprasteria.com> wrote:
>
> Hello !
>
> I'm trying to use this simple route with Camel 3.4.3 and springboot :
>
>
> from("timer:hello?repeatCount=1&delay=1000").routeId("hello")
> .to("log:1")
> .pollEnrich("file:d:\\temp?noop=true&fileName=dummy.csv",5000)
> .to("log:2");
>
> I run it without the file dummy.csv, to test the timeout option.
>
> The timeout functionality does not seem to work, as you can see in the log, there's no delay between log1 and log2:
>
> 2020-09-19 11:39:30.099 INFO 186564 --- [- timer://hello] 1 : Exchange[ExchangePattern: InOnly, BodyType: null, Body: [Body is null]]
> 2020-09-19 11:39:30.107 INFO 186564 --- [- timer://hello] o.a.camel.component.file.FileEndpoint : Endpoint is configured with noop=true so forcing endpoint to be idempotent as well
> 2020-09-19 11:39:30.107 INFO 186564 --- [- timer://hello] o.a.camel.component.file.FileEndpoint : Using default memory based idempotent repository with cache max size: 1000
> 2020-09-19 11:39:30.208 INFO 186564 --- [- timer://hello] 2 : Exchange[ExchangePattern: InOnly, BodyType: null, Body: [Body is null]]
>
> However, with Camel 2.24.3 It seems to work as expected as we can see the 5 sec delay between log1 and log2:
>
> 2020-09-19 11:38:50.242 INFO 151696 --- [- timer://hello] 1 : Exchange[ExchangePattern: InOnly, BodyType: null, Body: [Body is null]]
> 2020-09-19 11:38:50.244 INFO 151696 --- [- timer://hello] o.a.camel.processor.interceptor.Tracer : ID-ITEM-S74991-1600508328077-0-1 >>> (hello) log://1 --> pollEnrich[constant{file:d:\temp?noop=true&fileName=dummy.csv}] <<< Pattern:InOnly, Headers:{breadcrumbId=ID-ITEM-S74991-1600508328077-0-1, firedTime=Sat Sep 19 11:38:50 CEST 2020}, BodyType:null, Body:[Body is null]
> 2020-09-19 11:38:50.259 INFO 151696 --- [- timer://hello] o.a.camel.component.file.FileEndpoint : Endpoint is configured with noop=true so forcing endpoint to be idempotent as well
> 2020-09-19 11:38:50.259 INFO 151696 --- [- timer://hello] o.a.camel.component.file.FileEndpoint : Using default memory based idempotent repository with cache max size: 1000
> 2020-09-19 11:38:55.355 INFO 151696 --- [- timer://hello] o.a.camel.processor.interceptor.Tracer : ID-ITEM-S74991-1600508328077-0-1 >>> (hello) pollEnrich[constant{file:d:\temp?noop=true&fileName=dummy.csv}] --> log://2 <<< Pattern:InOnly, Headers:{breadcrumbId=ID-ITEM-S74991-1600508328077-0-1, CamelToEndpoint=file://d:%5Ctemp?fileName=dummy.csv&noop=true, firedTime=Sat Sep 19 11:38:50 CEST 2020}, BodyType:null, Body:[Body is null]
> 2020-09-19 11:38:55.355 INFO 151696 --- [- timer://hello] 2 : Exchange[ExchangePattern: InOnly, BodyType: null, Body: [Body is null]]
>
>
> Is there a bug in Camel 3 with this or I'm missing something ?
>
> Thanks in advance.
>
> Nicolas
--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2