You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by lleclerc <ll...@aim-rg.com> on 2013/02/21 16:45:54 UTC

How to drop messages using throttle ?

Hi,

I am trying to limit the amount of message to 2 per second and drop all
others.
(I don't want to delay, only dropping them, the most recent is the needed
one, but not 
too many)

from("seda:a").throttle(2).timePeriodMillis(1000).to("seda:b")
.process(new Processor() {...System.out.println("OUT");...);

Thanks you for any hints.



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-drop-messages-using-throttle-tp5727966.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to drop messages using throttle ?

Posted by lleclerc <ll...@aim-rg.com>.
Perfect !

Thanks !



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-drop-messages-using-throttle-tp5727966p5727968.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to drop messages using throttle ?

Posted by Raul Kripalani <ra...@evosent.com>.
Perhaps you're looking for the Sampling Throttler:
http://camel.apache.org/sampling.html.

Regards,

*Raúl Kripalani*
Apache Camel Committer
Enterprise Architect, Program Manager, Open Source Integration specialist
http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani
http://blog.raulkr.net | twitter: @raulvk <http://twitter.com/raulvk>

On Thu, Feb 21, 2013 at 3:45 PM, lleclerc <ll...@aim-rg.com> wrote:

> Hi,
>
> I am trying to limit the amount of message to 2 per second and drop all
> others.
> (I don't want to delay, only dropping them, the most recent is the needed
> one, but not
> too many)
>
> from("seda:a").throttle(2).timePeriodMillis(1000).to("seda:b")
> .process(new Processor() {...System.out.println("OUT");...);
>
> Thanks you for any hints.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/How-to-drop-messages-using-throttle-tp5727966.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>