You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Michael Täschner <m....@gmail.com> on 2014/12/12 16:13:31 UTC

EventNotifierSupport - Endpoint ID accessible ?

Hi Camel-Riders,

using Camel 2.13.2 we extend EventNotifierSupport to implement statistics
collection for routes and endpoints. For endpoints we can extract the
configured route id via exchange.getFromRouteId() but I can see no way to
access the "id" for endpoints in our camel spring dsl, only thing
accessible is endpoint.getEndpointKey() which gives back the uri content.
Unfortunately this is not very stable if uri options change and not a good
reference for our statistics map. Is there a way to access the "id" for
endpoints as declared in the route ?

Example route:
<route id="isbExampleService_route" trace="true">
<from id="httpEndpoint"
uri="cxf:bean:isbExampleService?dataFormat=MESSAGE&amp;synchronous=true" />
<to id="serviceImpl" uri="direct:
isb.lhsystems.com/services/IsbExampleServiceImpl" />
</route>

ServiceImpl Endpoint:
EndpointKey: "direct:isb.lhsystems.com/services/IsbExampleServiceImpl"
id = "serviceImpl" -- not visible/accessible ?!


Thanks and Regards,
Michael

Re: EventNotifierSupport - Endpoint ID accessible ?

Posted by Claus Ibsen <cl...@gmail.com>.
There is already stats per processor (eg each step in the route) -
these stats are in the jmx.

On Mon, Dec 15, 2014 at 11:46 AM, Michael Täschner
<m....@gmail.com> wrote:
> Hi,
>
> yes these are not "Endpoints" in the routes but I saw no clear definitions
> for the "steps" and each can be given an "id" I am interested in. I will
> check both approaches to see how to easily pick up the corresponding "id"
> for mapping the collected metrics against each step.
>
> @Claus: Do you think it makes sense to have monitoring/statistics down to
> route definition steps or will they be redundant compared to the
> monitoring/statistics of the overall route ?
>
> Thanks and Regards,
> Michael
>
> 2014-12-15 7:54 GMT+01:00 Claus Ibsen <cl...@gmail.com>:
>>
>> Endpoints do not have ids.
>>
>> Elemenets in routes have ids, so you can grab it from the route
>> definitions, there is api on camel context to dive in and find that.
>>
>>
>>
>> On Sat, Dec 13, 2014 at 3:35 PM, Willem Jiang <wi...@gmail.com>
>> wrote:
>> > The id attribute is define in OptionalIdentifiedDefinition which can be
>> unmarshaled from xml.
>> > But it’s not defined in endpoint, so you cannot access it from endpoint.
>> >
>> > --
>> > Willem Jiang
>> >
>> > Red Hat, Inc.
>> > Web: http://www.redhat.com
>> > Blog: http://willemjiang.blogspot.com (English)
>> > http://jnn.iteye.com (Chinese)
>> > Twitter: willemjiang
>> > Weibo: 姜宁willem
>> >
>> >
>> >
>> > On December 12, 2014 at 11:13:58 PM, Michael Täschner (
>> m.taeschner@gmail.com) wrote:
>> >> Hi Camel-Riders,
>> >>
>> >> using Camel 2.13.2 we extend EventNotifierSupport to implement
>> statistics
>> >> collection for routes and endpoints. For endpoints we can extract the
>> >> configured route id via exchange.getFromRouteId() but I can see no way
>> to
>> >> access the "id" for endpoints in our camel spring dsl, only thing
>> >> accessible is endpoint.getEndpointKey() which gives back the uri
>> content.
>> >> Unfortunately this is not very stable if uri options change and not a
>> good
>> >> reference for our statistics map. Is there a way to access the "id" for
>> >> endpoints as declared in the route ?
>> >>
>> >> Example route:
>> >>
>> >> > uri="cxf:bean:isbExampleService?dataFormat=MESSAGE&synchronous=true"
>> >> />
>> >>
>> >>
>> >>
>> >> ServiceImpl Endpoint:
>> >> EndpointKey: "direct:isb.lhsystems.com/services/IsbExampleServiceImpl"
>> >> id = "serviceImpl" -- not visible/accessible ?!
>> >>
>> >>
>> >> Thanks and Regards,
>> >> Michael
>> >>
>> >
>>
>>
>>
>> --
>> 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/
>>



-- 
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: EventNotifierSupport - Endpoint ID accessible ?

Posted by Michael Täschner <m....@gmail.com>.
Hi,

yes these are not "Endpoints" in the routes but I saw no clear definitions
for the "steps" and each can be given an "id" I am interested in. I will
check both approaches to see how to easily pick up the corresponding "id"
for mapping the collected metrics against each step.

@Claus: Do you think it makes sense to have monitoring/statistics down to
route definition steps or will they be redundant compared to the
monitoring/statistics of the overall route ?

Thanks and Regards,
Michael

2014-12-15 7:54 GMT+01:00 Claus Ibsen <cl...@gmail.com>:
>
> Endpoints do not have ids.
>
> Elemenets in routes have ids, so you can grab it from the route
> definitions, there is api on camel context to dive in and find that.
>
>
>
> On Sat, Dec 13, 2014 at 3:35 PM, Willem Jiang <wi...@gmail.com>
> wrote:
> > The id attribute is define in OptionalIdentifiedDefinition which can be
> unmarshaled from xml.
> > But it’s not defined in endpoint, so you cannot access it from endpoint.
> >
> > --
> > Willem Jiang
> >
> > Red Hat, Inc.
> > Web: http://www.redhat.com
> > Blog: http://willemjiang.blogspot.com (English)
> > http://jnn.iteye.com (Chinese)
> > Twitter: willemjiang
> > Weibo: 姜宁willem
> >
> >
> >
> > On December 12, 2014 at 11:13:58 PM, Michael Täschner (
> m.taeschner@gmail.com) wrote:
> >> Hi Camel-Riders,
> >>
> >> using Camel 2.13.2 we extend EventNotifierSupport to implement
> statistics
> >> collection for routes and endpoints. For endpoints we can extract the
> >> configured route id via exchange.getFromRouteId() but I can see no way
> to
> >> access the "id" for endpoints in our camel spring dsl, only thing
> >> accessible is endpoint.getEndpointKey() which gives back the uri
> content.
> >> Unfortunately this is not very stable if uri options change and not a
> good
> >> reference for our statistics map. Is there a way to access the "id" for
> >> endpoints as declared in the route ?
> >>
> >> Example route:
> >>
> >> > uri="cxf:bean:isbExampleService?dataFormat=MESSAGE&synchronous=true"
> >> />
> >>
> >>
> >>
> >> ServiceImpl Endpoint:
> >> EndpointKey: "direct:isb.lhsystems.com/services/IsbExampleServiceImpl"
> >> id = "serviceImpl" -- not visible/accessible ?!
> >>
> >>
> >> Thanks and Regards,
> >> Michael
> >>
> >
>
>
>
> --
> 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: EventNotifierSupport - Endpoint ID accessible ?

Posted by Claus Ibsen <cl...@gmail.com>.
Endpoints do not have ids.

Elemenets in routes have ids, so you can grab it from the route
definitions, there is api on camel context to dive in and find that.



On Sat, Dec 13, 2014 at 3:35 PM, Willem Jiang <wi...@gmail.com> wrote:
> The id attribute is define in OptionalIdentifiedDefinition which can be unmarshaled from xml.
> But it’s not defined in endpoint, so you cannot access it from endpoint.
>
> --
> Willem Jiang
>
> Red Hat, Inc.
> Web: http://www.redhat.com
> Blog: http://willemjiang.blogspot.com (English)
> http://jnn.iteye.com (Chinese)
> Twitter: willemjiang
> Weibo: 姜宁willem
>
>
>
> On December 12, 2014 at 11:13:58 PM, Michael Täschner (m.taeschner@gmail.com) wrote:
>> Hi Camel-Riders,
>>
>> using Camel 2.13.2 we extend EventNotifierSupport to implement statistics
>> collection for routes and endpoints. For endpoints we can extract the
>> configured route id via exchange.getFromRouteId() but I can see no way to
>> access the "id" for endpoints in our camel spring dsl, only thing
>> accessible is endpoint.getEndpointKey() which gives back the uri content.
>> Unfortunately this is not very stable if uri options change and not a good
>> reference for our statistics map. Is there a way to access the "id" for
>> endpoints as declared in the route ?
>>
>> Example route:
>>
>> > uri="cxf:bean:isbExampleService?dataFormat=MESSAGE&synchronous=true"
>> />
>>
>>
>>
>> ServiceImpl Endpoint:
>> EndpointKey: "direct:isb.lhsystems.com/services/IsbExampleServiceImpl"
>> id = "serviceImpl" -- not visible/accessible ?!
>>
>>
>> Thanks and Regards,
>> Michael
>>
>



-- 
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: EventNotifierSupport - Endpoint ID accessible ?

Posted by Willem Jiang <wi...@gmail.com>.
The id attribute is define in OptionalIdentifiedDefinition which can be unmarshaled from xml.
But it’s not defined in endpoint, so you cannot access it from endpoint.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 12, 2014 at 11:13:58 PM, Michael Täschner (m.taeschner@gmail.com) wrote:
> Hi Camel-Riders,
>  
> using Camel 2.13.2 we extend EventNotifierSupport to implement statistics
> collection for routes and endpoints. For endpoints we can extract the
> configured route id via exchange.getFromRouteId() but I can see no way to
> access the "id" for endpoints in our camel spring dsl, only thing
> accessible is endpoint.getEndpointKey() which gives back the uri content.
> Unfortunately this is not very stable if uri options change and not a good
> reference for our statistics map. Is there a way to access the "id" for
> endpoints as declared in the route ?
>  
> Example route:
>  
> > uri="cxf:bean:isbExampleService?dataFormat=MESSAGE&synchronous=true"  
> />
>  
>  
>  
> ServiceImpl Endpoint:
> EndpointKey: "direct:isb.lhsystems.com/services/IsbExampleServiceImpl"
> id = "serviceImpl" -- not visible/accessible ?!
>  
>  
> Thanks and Regards,
> Michael
>