You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by CASAUX Nicolas <ni...@soprasteria.com> on 2020/10/22 07:32:25 UTC
get consumers and producers info within Camel
Hello !
I would like to retrieve date of the consumers and the producers of my Camel context (org.apache.camel.management.mbean.ManagedConsumer and org.apache.camel.management.mbean.ManagedProducer)
As I'm using Camel 3.6.0, I used this:
getContext().getExtension(ManagedCamelContext.class)
From there, I can retrieve ManagedProcessor, ManagedRoute, and many other functions.
But I can't find a way to retrieve the consumers and the producers info.
I managed however, to retrieve consumers and producers info using directly queries to request the MBean server (like proposed here: https://stackoverflow.com/questions/22717446/get-information-about-all-camelcontext-defined-in-a-vm), but I feel it's a bit over complicated.
Is there a better way to get access to those managed beans ?
Thanks in advance !
Regards,
Nicolas
Re: get consumers and producers info within Camel
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
You can find the consumers and producers via the mbean server where
you can find them in the jmx tree.
See the unit tests in camel-core where you can find examples of that
such as ManagedProducerTest
On Thu, Oct 22, 2020 at 9:34 AM CASAUX Nicolas
<ni...@soprasteria.com> wrote:
>
> Sorry for the typo, not "date" but "data" of the consumers and the producers of my Camel context...
>
> -----Message d'origine-----
> De : CASAUX Nicolas <ni...@soprasteria.com>
> Envoyé : jeudi 22 octobre 2020 09:32
> À : users@camel.apache.org
> Objet : get consumers and producers info within Camel
>
> Hello !
>
> I would like to retrieve date of the consumers and the producers of my Camel context (org.apache.camel.management.mbean.ManagedConsumer and org.apache.camel.management.mbean.ManagedProducer)
>
> As I'm using Camel 3.6.0, I used this:
> getContext().getExtension(ManagedCamelContext.class)
>
> From there, I can retrieve ManagedProcessor, ManagedRoute, and many other functions.
> But I can't find a way to retrieve the consumers and the producers info.
>
> I managed however, to retrieve consumers and producers info using directly queries to request the MBean server (like proposed here: https://stackoverflow.com/questions/22717446/get-information-about-all-camelcontext-defined-in-a-vm), but I feel it's a bit over complicated.
>
> Is there a better way to get access to those managed beans ?
>
> Thanks in advance !
>
> Regards,
> Nicolas
--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2
RE: get consumers and producers info within Camel
Posted by CASAUX Nicolas <ni...@soprasteria.com>.
Sorry for the typo, not "date" but "data" of the consumers and the producers of my Camel context...
-----Message d'origine-----
De : CASAUX Nicolas <ni...@soprasteria.com>
Envoyé : jeudi 22 octobre 2020 09:32
À : users@camel.apache.org
Objet : get consumers and producers info within Camel
Hello !
I would like to retrieve date of the consumers and the producers of my Camel context (org.apache.camel.management.mbean.ManagedConsumer and org.apache.camel.management.mbean.ManagedProducer)
As I'm using Camel 3.6.0, I used this:
getContext().getExtension(ManagedCamelContext.class)
From there, I can retrieve ManagedProcessor, ManagedRoute, and many other functions.
But I can't find a way to retrieve the consumers and the producers info.
I managed however, to retrieve consumers and producers info using directly queries to request the MBean server (like proposed here: https://stackoverflow.com/questions/22717446/get-information-about-all-camelcontext-defined-in-a-vm), but I feel it's a bit over complicated.
Is there a better way to get access to those managed beans ?
Thanks in advance !
Regards,
Nicolas