You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by magner58 <jo...@gmail.com> on 2013/08/09 10:30:59 UTC

Timer with delay = 0 and repeatCount = 1 does not fire after resumed

Hi all,

I use camel to implement some routine for user-triggered data consumption.
When started/resumed it should poll data until there is no more and stop.

My route looks like:
from("timer:startPollingConsumer?delay=0&repeatCount=1").bean(myPollingConsumer);

The problem is that single event without delay will be fired only when the
route is started, but there will be none when it is resumed. Would it be a
bug?



--
View this message in context: http://camel.465427.n5.nabble.com/Timer-with-delay-0-and-repeatCount-1-does-not-fire-after-resumed-tp5737036.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Timer with delay = 0 and repeatCount = 1 does not fire after resumed

Posted by "dmytro.puzhay" <dm...@gmail.com>.
Switching to another account



--
View this message in context: http://camel.465427.n5.nabble.com/Timer-with-delay-0-and-repeatCount-1-does-not-fire-after-resumed-tp5737036p5741677.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Timer with delay = 0 and repeatCount = 1 does not fire after resumed

Posted by Claus Ibsen <cl...@gmail.com>.
suspend/resume will not reset the counter
stop/start will reset the counter

So what you should do is to stop/start the route

On Mon, Aug 12, 2013 at 1:35 PM, magner58 <jo...@gmail.com> wrote:
> Thanks for reply,
>
> "current behaviour" means that it is not the "intended behaviour" and you
> created a ticket to fix that, or that "current behaviour" IS actually the
> "intended behaviour"? :)
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Timer-with-delay-0-and-repeatCount-1-does-not-fire-after-resumed-tp5737036p5737139.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Timer with delay = 0 and repeatCount = 1 does not fire after resumed

Posted by magner58 <jo...@gmail.com>.
Thanks for reply,

"current behaviour" means that it is not the "intended behaviour" and you
created a ticket to fix that, or that "current behaviour" IS actually the
"intended behaviour"? :)



--
View this message in context: http://camel.465427.n5.nabble.com/Timer-with-delay-0-and-repeatCount-1-does-not-fire-after-resumed-tp5737036p5737139.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Timer with delay = 0 and repeatCount = 1 does not fire after resumed

Posted by Claus Ibsen <cl...@gmail.com>.
Actually this ought to be the current behavior. Use stop instead of suspend.

On Fri, Aug 9, 2013 at 4:54 PM, Claus Ibsen <cl...@gmail.com> wrote:
> Hi
>
> Ah yeah well the idea would be that a suspend/resume will not restart
> the counter. Where as a stop/start should do. Let me log a ticket
> about this.
>
>
> On Fri, Aug 9, 2013 at 10:30 AM, magner58 <jo...@gmail.com> wrote:
>> Hi all,
>>
>> I use camel to implement some routine for user-triggered data consumption.
>> When started/resumed it should poll data until there is no more and stop.
>>
>> My route looks like:
>> from("timer:startPollingConsumer?delay=0&repeatCount=1").bean(myPollingConsumer);
>>
>> The problem is that single event without delay will be fired only when the
>> route is started, but there will be none when it is resumed. Would it be a
>> bug?
>>
>>
>>
>> --
>> View this message in context: http://camel.465427.n5.nabble.com/Timer-with-delay-0-and-repeatCount-1-does-not-fire-after-resumed-tp5737036.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: cibsen@redhat.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Timer with delay = 0 and repeatCount = 1 does not fire after resumed

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Ah yeah well the idea would be that a suspend/resume will not restart
the counter. Where as a stop/start should do. Let me log a ticket
about this.


On Fri, Aug 9, 2013 at 10:30 AM, magner58 <jo...@gmail.com> wrote:
> Hi all,
>
> I use camel to implement some routine for user-triggered data consumption.
> When started/resumed it should poll data until there is no more and stop.
>
> My route looks like:
> from("timer:startPollingConsumer?delay=0&repeatCount=1").bean(myPollingConsumer);
>
> The problem is that single event without delay will be fired only when the
> route is started, but there will be none when it is resumed. Would it be a
> bug?
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Timer-with-delay-0-and-repeatCount-1-does-not-fire-after-resumed-tp5737036.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen