You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by David Hoffer <dh...@gmail.com> on 2017/09/25 21:44:59 UTC

How to remove message from ManagedRouteMBean

We use Camel's JMX feature to report the overall stats/status of all the
routes in our application (e.g. ManagedRouteMBean).

However the routes often make heavy use of Camel's choice option where we
have multiple when/simple options and then if no matches are found we use
an otherwise/stop to make that a no-op for that route.

The problem is the JMS reporting is wrong from the user's perspective as
Camel includes all of the otherwise/stop entries which should not be
included from the user's perspective.

How can I remove from the ManagedRouteMBean metrics the files/messages that
were not actually processed by the route and were a no-op via the
otherwise/stop?

Is there a way in the otherwise/stop I can remove that file from JMX
metrics?

-Dave

Re: How to remove message from ManagedRouteMBean

Posted by David Hoffer <dh...@gmail.com>.
I was afraid you were going to say that.  That is the approach I have been
taking but the problem is the parent route still includes the messages
going to the 'otherwise-stop' so it confuses people.  Ideally we want the
parent route to record only what the children processed.

Thanks,
-Dave

On Mon, Sep 25, 2017 at 11:41 PM, Claus Ibsen <cl...@gmail.com> wrote:

> Hi
>
> This is not possible.
>
> But you can in the route with the choice and the otherwise, then route
> to other routes via direct endpoints.
> And then you can use the metrics of those routes (the ones that they
> call) as your metrics, as the otherwise will not call any route.
>
> On Mon, Sep 25, 2017 at 11:44 PM, David Hoffer <dh...@gmail.com> wrote:
> > We use Camel's JMX feature to report the overall stats/status of all the
> > routes in our application (e.g. ManagedRouteMBean).
> >
> > However the routes often make heavy use of Camel's choice option where we
> > have multiple when/simple options and then if no matches are found we use
> > an otherwise/stop to make that a no-op for that route.
> >
> > The problem is the JMS reporting is wrong from the user's perspective as
> > Camel includes all of the otherwise/stop entries which should not be
> > included from the user's perspective.
> >
> > How can I remove from the ManagedRouteMBean metrics the files/messages
> that
> > were not actually processed by the route and were a no-op via the
> > otherwise/stop?
> >
> > Is there a way in the otherwise/stop I can remove that file from JMX
> > metrics?
> >
> > -Dave
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>

Re: How to remove message from ManagedRouteMBean

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

This is not possible.

But you can in the route with the choice and the otherwise, then route
to other routes via direct endpoints.
And then you can use the metrics of those routes (the ones that they
call) as your metrics, as the otherwise will not call any route.

On Mon, Sep 25, 2017 at 11:44 PM, David Hoffer <dh...@gmail.com> wrote:
> We use Camel's JMX feature to report the overall stats/status of all the
> routes in our application (e.g. ManagedRouteMBean).
>
> However the routes often make heavy use of Camel's choice option where we
> have multiple when/simple options and then if no matches are found we use
> an otherwise/stop to make that a no-op for that route.
>
> The problem is the JMS reporting is wrong from the user's perspective as
> Camel includes all of the otherwise/stop entries which should not be
> included from the user's perspective.
>
> How can I remove from the ManagedRouteMBean metrics the files/messages that
> were not actually processed by the route and were a no-op via the
> otherwise/stop?
>
> Is there a way in the otherwise/stop I can remove that file from JMX
> metrics?
>
> -Dave



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2