You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Kasim Sert (Ibtech-Software Infrastructure)" <ka...@ibtech.com.tr> on 2016/11/02 05:28:01 UTC

Polling consumer poll period

Hi,

Although timer period is 10 seconds , when i check the logs I can see this polling occurs every 1 minute. I changed the polling consumer timeout but same result.
Why is this behaviour ?

Note : Using camel 2.18.0 with Spring Boot.


            from("timer://mytimer?period=10000")
                  .bean(MyBean.class)
                  .pollEnrich("imaps://"+host+":993 ",1000)
                  .log("finish");

Log:

2016-11-02 07:23:05.375  INFO 22784 --- [timer://mytimer] route1
2016-11-02 07:24:05.376  INFO 22784 --- [timer://mytimer] route1
2016-11-02 07:25:05.376  INFO 22784 --- [timer://mytimer] route1




Bu e-posta'n?n i?erdi?i bilgiler (ekleri dahil olmak ?zere) gizlidir. Onay?m?z olmaks?z?n ???nc? ki?ilere a?iklanamaz. Bu mesaj?n g?nderilmek istendi?i ki?i de?ilseniz, l?tfen mesaj? sisteminizden derhal siliniz. IBTech A.?. bu mesaj?n i?erdi?i bilgilerin do?rulu?u veya eksiksiz oldu?u konusunda bir garanti vermemektedir. Bu nedenle bilgilerin ne ?ekilde olursa olsun i?eri?inden, iletilmesinden, al?nmas?ndan, saklanmas?ndan sorumlu de?ildir. Bu mesaj?n i?eri?i yazar?na ait olup, IBTech A.?.'nin g?r??lerini i?ermeyebilir.

The information contained in this e-mail (including any attachments)is confidential. It must not be disclosed to any person without our authority. If you are not the intended recipient, please delete it from your system immediately. IBTech A.S. makes no warranty as to the accuracy or completeness of any information contained in this message and hereby excludes any liability of any kind for the information contained therein or for the information transmission, reception, storage or use of such in any way whatsoever. Any opinions expressed in this message are those of the author and may not necessarily reflect the opinions of IBTech A.S.

Re: Polling consumer poll period

Posted by Brad Johnson <br...@mediadriver.com>.
Kasim,

Have you tried polling a local resource just to see if the results are the
same?  For example, if you poll file://foo.txt with a few lines of text in
it do you still see the 1 minute timeout?  Also, what is happening your
Bean class?  I assume there isn't some long lived process in there.

So if you use, this as a test, what do you see?

    from("timer://mytimer?period=10000")
                  .pollEnrich("file:foo.txt",1000)
                  .log("finish");

On Wed, Nov 2, 2016 at 5:19 AM, cacert <ka...@gmail.com> wrote:

> Hi,
>
> Where is this one minute waiting time is coming from. If I disable
> pollingEnrich() then I see timer works as expected(its sending an empty
> exchange every 10 seconds).
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.
> com/Polling-consumer-poll-period-tp5789609p5789625.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: Polling consumer poll period

Posted by cacert <ka...@gmail.com>.
Hi,

Where is this one minute waiting time is coming from. If I disable
pollingEnrich() then I see timer works as expected(its sending an empty
exchange every 10 seconds). 



--
View this message in context: http://camel.465427.n5.nabble.com/Polling-consumer-poll-period-tp5789609p5789625.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Polling consumer poll period

Posted by Zoran Regvart <zr...@redhat.com>.
Hi Kasim,
you need to add fixedRate=true to timer parameters, see example at:

http://camel.apache.org/timer.html#Timer-Sample

zoran

On Wed, Nov 2, 2016 at 6:28 AM, Kasim Sert (Ibtech-Software
Infrastructure) <ka...@ibtech.com.tr> wrote:
> Hi,
>
> Although timer period is 10 seconds , when i check the logs I can see this polling occurs every 1 minute. I changed the polling consumer timeout but same result.
> Why is this behaviour ?
>
> Note : Using camel 2.18.0 with Spring Boot.
>
>
>             from("timer://mytimer?period=10000")
>                   .bean(MyBean.class)
>                   .pollEnrich("imaps://"+host+":993 ",1000)
>                   .log("finish");
>
> Log:
>
> 2016-11-02 07:23:05.375  INFO 22784 --- [timer://mytimer] route1
> 2016-11-02 07:24:05.376  INFO 22784 --- [timer://mytimer] route1
> 2016-11-02 07:25:05.376  INFO 22784 --- [timer://mytimer] route1


-- 
Zoran Regvart
zregvart@redhat.com