Camel
  1. Camel
  2. CAMEL-4366

Expose Exchange Load statistics in Route and Context MBeans

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9.0
    • Component/s: camel-core, jmx
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      Add load statistics exposing a exponentially moving weighted average for the number of inflight exchanges in routes and the whole CamelContext. Initially the window is fixed to 1m, 5m and 15m, just like Linux load figures.

      1. load-patch-1
        18 kB
        Christian Ohr
      2. Load.png
        23 kB
        Claus Ibsen

        Activity

        Hide
        Christian Ohr added a comment -

        Added first version of exposing exchange loads for context and route over JMX (+ some unit tests)

        Show
        Christian Ohr added a comment - Added first version of exposing exchange loads for context and route over JMX (+ some unit tests)
        Hide
        Claus Ibsen added a comment -

        Christian do you have a link to that load algorithm being used? I would like to add a note where to read more about it from the source code.

        Show
        Claus Ibsen added a comment - Christian do you have a link to that load algorithm being used? I would like to add a note where to read more about it from the source code.
        Hide
        Claus Ibsen added a comment -

        Screenshot with load from JMX on CamelContext

        Show
        Claus Ibsen added a comment - Screenshot with load from JMX on CamelContext
        Hide
        Claus Ibsen added a comment -

        I attached a screenshot with the patch being incorporated.

        I will add a option on Camel JMX so you can enable|disable this. As it uses a background thread to update the load. And maybe some ppl do not need this details.

        I am also not using a static instance as that dont work well in hot deploy server environments. So instead each CamelContext has its own background task. And the thread pool / thread task is handled by the Camel ExecutorService API for that. So that is aligned like the rest of the code.

        Show
        Claus Ibsen added a comment - I attached a screenshot with the patch being incorporated. I will add a option on Camel JMX so you can enable|disable this. As it uses a background thread to update the load. And maybe some ppl do not need this details. I am also not using a static instance as that dont work well in hot deploy server environments. So instead each CamelContext has its own background task. And the thread pool / thread task is handled by the Camel ExecutorService API for that. So that is aligned like the rest of the code.
        Hide
        Claus Ibsen added a comment -

        Okay I have applied the patch into trunk.

        The load statistics is part of the performance stats, so you can disable it all together, by setting that option to Off.
        See the Camel JMX wiki page for details.

        Show
        Claus Ibsen added a comment - Okay I have applied the patch into trunk. The load statistics is part of the performance stats, so you can disable it all together, by setting that option to Off. See the Camel JMX wiki page for details.
        Hide
        christian ohr added a comment -

        Cool. Thanks for working on this!
        I didn't feel too well with the TimerTask singleton either, but I simply overlooked the ScheduledExecutorService.

        Show
        christian ohr added a comment - Cool. Thanks for working on this! I didn't feel too well with the TimerTask singleton either, but I simply overlooked the ScheduledExecutorService.

          People

          • Assignee:
            Claus Ibsen
            Reporter:
            christian ohr
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development