camel threshold

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

camel threshold

kiranreddykasa
Hi

How can we find out the threshold for any camel route ?
I mean how to find the maximum number of messages a particular route can process and it can't take
any more messages.

I came across camel throttle , if the threshold is reached the new messages will be saved somewhere for processing ?
Regards

kiran Reddy
Reply | Threaded
Open this post in threaded view
|

Re: camel threshold

Jon Anstey
Routes keep going until they are paused or stopped. Your best bet is
probably a custom RoutePolicy http://camel.apache.org/routepolicy.html that
does the custom throttling (pausing or stopping a route i guess) after X
exchanges.


On Mon, Aug 12, 2013 at 7:53 AM, kiranreddykasa <[hidden email]>wrote:

> Hi
>
> How can we find out the threshold for any camel route ?
> I mean how to find the maximum number of messages a particular route can
> process and it can't take
> any more messages.
>
> I came across camel throttle , if the threshold is reached the new messages
> will be saved somewhere for processing ?
>
>
>
> -----
> Regards
>
> kiran Reddy
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/camel-threshold-tp5737136.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



--
Cheers,
Jon
---------------
Red Hat, Inc.
Email: [hidden email]
Web: http://redhat.com
Twitter: jon_anstey
Blog: http://janstey.blogspot.com
Author of Camel in Action: http://manning.com/ibsen
Reply | Threaded
Open this post in threaded view
|

Re: camel threshold

kiranreddykasa
Hi

consider this simple route

from("netty:tcp://0.0.0.0:7004?textline=true").throttle(100).to("netty:tcp://0.0.0.0:7005?textline=true");

According to this only 100 requests per second  will be sent to second endpoint.

Assume that first endpoint is receiving  some thousand messages per second, how camel is able to throttle these messages without saving anywhere ?
There won't be any out of memory issues ??
Can anyone please explain ?
Regards

kiran Reddy
Reply | Threaded
Open this post in threaded view
|

Re: camel threshold

Claus Ibsen-2
Yes the throttle is in-memory queue based, so you could end up eating up memory.


There is a route policy that can also throttle by suspending/resuming
the actual route, which then would mean that if the route is suspended
then no new incoming messages comes in.



On Wed, Aug 14, 2013 at 11:23 AM, kiranreddykasa <[hidden email]> wrote:

> Hi
>
> consider this simple route
>
> from("netty:tcp://0.0.0.0:7004?textline=true").throttle(100).to("netty:tcp://0.0.0.0:7005?textline=true");
>
> According to this only 100 requests per second  will be sent to second
> endpoint.
>
> Assume that first endpoint is receiving  some thousand messages per second,
> how camel is able to throttle these messages without saving anywhere ?
> There won't be any out of memory issues ??
> Can anyone please explain ?
>
>
>
> -----
> Regards
>
> kiran Reddy
> --
> View this message in context: http://camel.465427.n5.nabble.com/camel-threshold-tp5737136p5737239.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



--
Claus Ibsen
-----------------
Red Hat, Inc.
Email: [hidden email]
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Reply | Threaded
Open this post in threaded view
|

Re: camel threshold

kiranreddykasa
Hi

Thanks for reply.

One more clarification

There is request time out option in netty right ,
For handing time outs also any in-memory queue  will be used ?

Because there may be chances  we get memory issues when external sever is not at all replying .

Regards

kiran Reddy
Reply | Threaded
Open this post in threaded view
|

Re: camel threshold

kiranreddykasa
hi

Any update regarding netty request time out?
Regards

kiran Reddy
Reply | Threaded
Open this post in threaded view
|

Re: camel threshold

Claus Ibsen-2
In reply to this post by kiranreddykasa
Yes its all in memory based.

On Wed, Aug 14, 2013 at 12:09 PM, kiranreddykasa <[hidden email]> wrote:

> Hi
>
> Thanks for reply.
>
> One more clarification
>
> There is request time out option in netty right ,
> For handing time outs also any in-memory queue  will be used ?
>
> Because there may be chances  we get memory issues when external sever is
> not at all replying .
>
>
>
>
>
> -----
> Regards
>
> kiran Reddy
> --
> View this message in context: http://camel.465427.n5.nabble.com/camel-threshold-tp5737136p5737244.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



--
Claus Ibsen
-----------------
Red Hat, Inc.
Email: [hidden email]
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen