You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Anton Hughes <ku...@gmail.com> on 2015/01/21 23:49:11 UTC

Logging throttled messages?

Hi

We are looking at using the throttler, but would like to know if it is
possible to log throttled messages.

Does anyone know if that is possible?

Thanks

Re: Logging throttled messages?

Posted by Claus Ibsen <cl...@gmail.com>.
The inflight policy is throttling on the consumer, so it basically
turn the consumer on | off depending on the thresholds.

On Mon, Jan 26, 2015 at 1:19 AM, Anton Hughes <ku...@gmail.com> wrote:
> Hi Claus
>
> We are using Jboss Switchyard, and the current stable release uses Camel
> 2.10, and the rejectExecution is available in 2.14.
>
> So, I am again looking into ThrottlingInflightRoutePolicy.
>
> Am I correct in my understanding that ThrottlingInflightRoutePolicy will
> stop ALL messages, until the number of incoming messages drops below the
> set percentage (resumePercentOfMax) is reached.
>
> I am assuming that it is not possible only allow a maximum number of
> messages per timeframe, without suspending the route - using
> ThrottlingInflightRoutePolicy. Is this correct?
>
> Thanks
>
> On Sat, Jan 24, 2015 at 10:34 PM, Anton Hughes <ku...@gmail.com> wrote:
>
>>
>> On Sat, Jan 24, 2015 at 9:42 PM, Claus Ibsen <cl...@gmail.com>
>> wrote:
>>
>>> You can use the rejectExecution option and then use an error handler
>>> to catch that exception and then handle and log it.
>>> http://camel.apache.org/throttler
>>>
>>
>> Thanks Claus
>>



-- 
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
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Re: Logging throttled messages?

Posted by Anton Hughes <ku...@gmail.com>.
Hi Claus

We are using Jboss Switchyard, and the current stable release uses Camel
2.10, and the rejectExecution is available in 2.14.

So, I am again looking into ThrottlingInflightRoutePolicy.

Am I correct in my understanding that ThrottlingInflightRoutePolicy will
stop ALL messages, until the number of incoming messages drops below the
set percentage (resumePercentOfMax) is reached.

I am assuming that it is not possible only allow a maximum number of
messages per timeframe, without suspending the route - using
ThrottlingInflightRoutePolicy. Is this correct?

Thanks

On Sat, Jan 24, 2015 at 10:34 PM, Anton Hughes <ku...@gmail.com> wrote:

>
> On Sat, Jan 24, 2015 at 9:42 PM, Claus Ibsen <cl...@gmail.com>
> wrote:
>
>> You can use the rejectExecution option and then use an error handler
>> to catch that exception and then handle and log it.
>> http://camel.apache.org/throttler
>>
>
> Thanks Claus
>

Re: Logging throttled messages?

Posted by Anton Hughes <ku...@gmail.com>.
On Sat, Jan 24, 2015 at 9:42 PM, Claus Ibsen <cl...@gmail.com> wrote:

> You can use the rejectExecution option and then use an error handler
> to catch that exception and then handle and log it.
> http://camel.apache.org/throttler
>

Thanks Claus

Re: Logging throttled messages?

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

You can use the rejectExecution option and then use an error handler
to catch that exception and then handle and log it.
http://camel.apache.org/throttler

On Sat, Jan 24, 2015 at 2:23 AM, Anton Hughes <ku...@gmail.com> wrote:
> On Sat, Jan 24, 2015 at 1:20 AM, Claus Ibsen <cl...@gmail.com> wrote:
>
>> log how?
>
>
> Hi Claus
>
> My use-case is, my application sometimes gets overloaded due to too many
> incoming messages. In order to maintain uptime and performance I would like
> to throttle these. Specifically, i would like to discard - not delay - any
> messages that are above the throttle threshold.
>
> However, should there be the need to identify if a message was discarded, I
> need to log to file each message that has been discarded due to being
> throttled.
>
> Would the ThrottlingInflightRoutePolicy be the best solution for this?
>
> Thanks



-- 
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
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Re: Logging throttled messages?

Posted by Anton Hughes <ku...@gmail.com>.
On Sat, Jan 24, 2015 at 1:20 AM, Claus Ibsen <cl...@gmail.com> wrote:

> log how?


Hi Claus

My use-case is, my application sometimes gets overloaded due to too many
incoming messages. In order to maintain uptime and performance I would like
to throttle these. Specifically, i would like to discard - not delay - any
messages that are above the throttle threshold.

However, should there be the need to identify if a message was discarded, I
need to log to file each message that has been discarded due to being
throttled.

Would the ThrottlingInflightRoutePolicy be the best solution for this?

Thanks

Re: Logging throttled messages?

Posted by Claus Ibsen <cl...@gmail.com>.
On Fri, Jan 23, 2015 at 12:08 AM, Anton Hughes <ku...@gmail.com> wrote:
> On Fri, Jan 23, 2015 at 12:30 AM, Claus Ibsen <cl...@gmail.com> wrote:
>
>> What do you mean by "log throttled messages"? Do you want for example
>> to know if a message was hold back by the throttler or not? Or do you
>> want the throttler to do some kind of logging if it holds back a
>> message and how would you configure that in camel ?
>>
>
> Hi Claus
> To clarify, i would like to log messages that are dropped/held back by the
> throttler.

log how?


>
> Thanks



-- 
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
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Re: Logging throttled messages?

Posted by Anton Hughes <ku...@gmail.com>.
On Fri, Jan 23, 2015 at 12:30 AM, Claus Ibsen <cl...@gmail.com> wrote:

> What do you mean by "log throttled messages"? Do you want for example
> to know if a message was hold back by the throttler or not? Or do you
> want the throttler to do some kind of logging if it holds back a
> message and how would you configure that in camel ?
>

Hi Claus
To clarify, i would like to log messages that are dropped/held back by the
throttler.

Thanks

Re: Logging throttled messages?

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

What do you mean by "log throttled messages"? Do you want for example
to know if a message was hold back by the throttler or not? Or do you
want the throttler to do some kind of logging if it holds back a
message and how would you configure that in camel ?

On Wed, Jan 21, 2015 at 11:49 PM, Anton Hughes <ku...@gmail.com> wrote:
> Hi
>
> We are looking at using the throttler, but would like to know if it is
> possible to log throttled messages.
>
> Does anyone know if that is possible?
>
> Thanks



-- 
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
hawtio: http://hawt.io/
fabric8: http://fabric8.io/