[ 
https://issues.apache.org/jira/browse/CAMEL-1902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12976664#action_12976664
 ] 

Claus Ibsen commented on CAMEL-1902:
------------------------------------

Ben thanks for getting started with this.

The issue with a timer based is concurrency, most often during heavy load. And 
this is actually where this new feature makes sense.
So we may have a situation that 2+ threads is creating a log message which may 
eventually have log messages "duplicated".
This can be prevented using synchronization / locks. But that hampers 
performance.

But that may be an acceptable tradeoff.

I would consider using a Scheduler to issue a task which performs the logging. 
Then we can also log when there is no activity.

And we could aslo offer management to the logger, so you can change the options 
at runtime using JMX. But thats another ticket :)

> ThroughputLogger - Add ability to be timer based
> ------------------------------------------------
>
>                 Key: CAMEL-1902
>                 URL: https://issues.apache.org/jira/browse/CAMEL-1902
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-core
>    Affects Versions: 2.0-M3
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.7.0
>
>         Attachments: camel-core-throughputLogger-groupPeriod.txt
>
>
> The ThroughputLogger is based on a size so it reports when X messages has 
> passed it.
> What is needed is to be able to say it should report every X period instead.
> And add option to not report before first message have arrived.
> And add option to not report if the value was 0 for the 2nd time in case of a 
> long inactivity period

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to