You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Mitko Kolev (JIRA)" <ji...@apache.org> on 2011/04/27 17:02:03 UTC

[jira] [Created] (CAMEL-3906) Consumer and Producer names in JMX

Consumer and Producer names in JMX
----------------------------------

                 Key: CAMEL-3906
                 URL: https://issues.apache.org/jira/browse/CAMEL-3906
             Project: Camel
          Issue Type: Improvement
          Components: camel-core
            Reporter: Mitko Kolev
            Priority: Minor
             Fix For: 2.8.0


Currently the consumer and producer names in JMX have a name based on their java instance [1]. Due to this it is not obvious what is the endpoint  of the consumers/producers.

It can be improved to use name in the JMX tree based on endpoint URI of the consumer/producer endpoints (combined with identityHashcode) to help in the overview to faster spot the desired consumer.


[1] Copy/paste from the DefaultManagementNamingStrategy

...
   String name = consumer.getClass().getSimpleName();
        if (ObjectHelper.isEmpty(name)) {
            name = "Consumer";
        }
        buffer.append(KEY_NAME + "=")
            .append(name)
            .append("(").append(ObjectHelper.getIdentityHashCode(consumer)).append(")");

...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-3906) Consumer and Producer names in JMX

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-3906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13030859#comment-13030859 ] 

Claus Ibsen commented on CAMEL-3906:
------------------------------------

Note that if we put part of the endpoint uri in the key of the MBean, then like mentioned above. The user could stop the consumer, change parameters on the endpoint, and start it again. For example to consume messages from another destination.

> Consumer and Producer names in JMX
> ----------------------------------
>
>                 Key: CAMEL-3906
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3906
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Mitko Kolev
>            Assignee: Ben O'Day
>            Priority: Minor
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3906.patch
>
>
> Currently the consumer and producer names in JMX have a name based on their java instance [1]. Due to this it is not obvious what is the endpoint  of the consumers/producers.
> It can be improved to use name in the JMX tree based on endpoint URI of the consumer/producer endpoints (combined with identityHashcode) to help in the overview to faster spot the desired consumer.
> [1] Copy/paste from the DefaultManagementNamingStrategy
> ...
>    String name = consumer.getClass().getSimpleName();
>         if (ObjectHelper.isEmpty(name)) {
>             name = "Consumer";
>         }
>         buffer.append(KEY_NAME + "=")
>             .append(name)
>             .append("(").append(ObjectHelper.getIdentityHashCode(consumer)).append(")");
> ...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Issue Comment Edited] (CAMEL-3906) Consumer and Producer names in JMX

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-3906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13030855#comment-13030855 ] 

Claus Ibsen edited comment on CAMEL-3906 at 5/9/11 6:55 PM:
------------------------------------------------------------

The problem with this patch is that your hardlock the route label when the MBean gets enlisted. If the route is later stopped, and the processor is adjusted, then the MBean would potential be misleading.

Also the labels can get long and complicated. If you use an aggregator etc.

Also you can potentially have clashes if there are multiple routes with similar routes.
You frankly need the identify hash code.


I have though about adding a /routeX in the MBean key if its part of a route. Then you would have a tree like
{code}
+ consumers
\- route1
   + consumer1
\- route2
   + consumer2
{code}
Then its maybe quicker to find the consumer you are looking for.

On the consumer MBean we may enlist part of the endpoint in its name.
Then you may be able to quicker identify what you are looking for. Although endpoint uris can be long and complicated.
We maybe strip all parameters.


So you will see something like
{code}
JmsConsumer[queue:foo](0xab242de)
FileConsumer[/inbox/orders](0x12d42af)
{code}



      was (Author: davsclaus):
    The problem with this patch is that your hardlock the route label when the MBean gets enlisted. If the route is later stopped, and the processor is adjusted, then the MBean would potential be misleading.

Also the labels can get long and complicated. If you use an aggregator etc.

Also you can potentially have clashes if there are multiple routes with similar routes.
You frankly need the identify hash code.


I have though about adding a /routeX in the MBean key if its part of a route. Then you would have a tree like

+ consumers
\- route1
\- route2

Then its maybe quicker to find the consumer you are looking for.

  
> Consumer and Producer names in JMX
> ----------------------------------
>
>                 Key: CAMEL-3906
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3906
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Mitko Kolev
>            Assignee: Ben O'Day
>            Priority: Minor
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3906.patch
>
>
> Currently the consumer and producer names in JMX have a name based on their java instance [1]. Due to this it is not obvious what is the endpoint  of the consumers/producers.
> It can be improved to use name in the JMX tree based on endpoint URI of the consumer/producer endpoints (combined with identityHashcode) to help in the overview to faster spot the desired consumer.
> [1] Copy/paste from the DefaultManagementNamingStrategy
> ...
>    String name = consumer.getClass().getSimpleName();
>         if (ObjectHelper.isEmpty(name)) {
>             name = "Consumer";
>         }
>         buffer.append(KEY_NAME + "=")
>             .append(name)
>             .append("(").append(ObjectHelper.getIdentityHashCode(consumer)).append(")");
> ...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-3906) Consumer and Producer names in JMX

Posted by "Ben O'Day (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-3906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13030913#comment-13030913 ] 

Ben O'Day commented on CAMEL-3906:
----------------------------------

For the consumer name, agreed that the endpoint name and trimmed URI would help.  Also, I removed the identity hash code because I thought only a single consumer could exist for a given endpointURI...perhaps not.  

For the processors being altered after startup, I see your point.  But, it seems like it would be an issue regardless of whether we name the MBean using the endpointURI or construct an MBean path based on endpointURIs.  Can we easily re-register with JMX when these types of changes occur?

> Consumer and Producer names in JMX
> ----------------------------------
>
>                 Key: CAMEL-3906
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3906
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Mitko Kolev
>            Assignee: Ben O'Day
>            Priority: Minor
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3906.patch
>
>
> Currently the consumer and producer names in JMX have a name based on their java instance [1]. Due to this it is not obvious what is the endpoint  of the consumers/producers.
> It can be improved to use name in the JMX tree based on endpoint URI of the consumer/producer endpoints (combined with identityHashcode) to help in the overview to faster spot the desired consumer.
> [1] Copy/paste from the DefaultManagementNamingStrategy
> ...
>    String name = consumer.getClass().getSimpleName();
>         if (ObjectHelper.isEmpty(name)) {
>             name = "Consumer";
>         }
>         buffer.append(KEY_NAME + "=")
>             .append(name)
>             .append("(").append(ObjectHelper.getIdentityHashCode(consumer)).append(")");
> ...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-3906) Consumer and Producer names in JMX

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-3906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13031054#comment-13031054 ] 

Claus Ibsen commented on CAMEL-3906:
------------------------------------

Well you could add consumers/processors etc that are not part of a route. Just use the Camel API for that. And if you have enabled JMX to enlist always then it will do that. But I guess its uncommon and not something that the regular Camel end users does.

And yes the endpoint being part of the MBean key would be an issue if the endpoint is dynamic updated afterwards.
We could of course notice this in the documentation that the MBean key is the starting endpoint uri. And the actual uri is the attribute. So in case people dynamic change it they are aware of this fact. I think thats sufficient. Also I guess it would be uncommon/rare to adjust this.


> Consumer and Producer names in JMX
> ----------------------------------
>
>                 Key: CAMEL-3906
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3906
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Mitko Kolev
>            Assignee: Ben O'Day
>            Priority: Minor
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3906.patch
>
>
> Currently the consumer and producer names in JMX have a name based on their java instance [1]. Due to this it is not obvious what is the endpoint  of the consumers/producers.
> It can be improved to use name in the JMX tree based on endpoint URI of the consumer/producer endpoints (combined with identityHashcode) to help in the overview to faster spot the desired consumer.
> [1] Copy/paste from the DefaultManagementNamingStrategy
> ...
>    String name = consumer.getClass().getSimpleName();
>         if (ObjectHelper.isEmpty(name)) {
>             name = "Consumer";
>         }
>         buffer.append(KEY_NAME + "=")
>             .append(name)
>             .append("(").append(ObjectHelper.getIdentityHashCode(consumer)).append(")");
> ...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CAMEL-3906) Consumer and Producer names in JMX

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-3906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-3906:
-------------------------------

    Fix Version/s:     (was: 2.8.0)
                   2.9.0

> Consumer and Producer names in JMX
> ----------------------------------
>
>                 Key: CAMEL-3906
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3906
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Mitko Kolev
>            Assignee: Ben O'Day
>            Priority: Minor
>             Fix For: 2.9.0
>
>         Attachments: CAMEL-3906.patch
>
>
> Currently the consumer and producer names in JMX have a name based on their java instance [1]. Due to this it is not obvious what is the endpoint  of the consumers/producers.
> It can be improved to use name in the JMX tree based on endpoint URI of the consumer/producer endpoints (combined with identityHashcode) to help in the overview to faster spot the desired consumer.
> [1] Copy/paste from the DefaultManagementNamingStrategy
> ...
>    String name = consumer.getClass().getSimpleName();
>         if (ObjectHelper.isEmpty(name)) {
>             name = "Consumer";
>         }
>         buffer.append(KEY_NAME + "=")
>             .append(name)
>             .append("(").append(ObjectHelper.getIdentityHashCode(consumer)).append(")");
> ...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (CAMEL-3906) Consumer and Producer names in JMX

Posted by "Ben O'Day (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-3906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ben O'Day reassigned CAMEL-3906:
--------------------------------

    Assignee: Ben O'Day

> Consumer and Producer names in JMX
> ----------------------------------
>
>                 Key: CAMEL-3906
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3906
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Mitko Kolev
>            Assignee: Ben O'Day
>            Priority: Minor
>             Fix For: 2.8.0
>
>
> Currently the consumer and producer names in JMX have a name based on their java instance [1]. Due to this it is not obvious what is the endpoint  of the consumers/producers.
> It can be improved to use name in the JMX tree based on endpoint URI of the consumer/producer endpoints (combined with identityHashcode) to help in the overview to faster spot the desired consumer.
> [1] Copy/paste from the DefaultManagementNamingStrategy
> ...
>    String name = consumer.getClass().getSimpleName();
>         if (ObjectHelper.isEmpty(name)) {
>             name = "Consumer";
>         }
>         buffer.append(KEY_NAME + "=")
>             .append(name)
>             .append("(").append(ObjectHelper.getIdentityHashCode(consumer)).append(")");
> ...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CAMEL-3906) Consumer and Producer names in JMX

Posted by "Ben O'Day (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-3906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ben O'Day updated CAMEL-3906:
-----------------------------

    Attachment: CAMEL-3906.patch

simple patch to make consumer/processor JMX names more descriptive

> Consumer and Producer names in JMX
> ----------------------------------
>
>                 Key: CAMEL-3906
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3906
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Mitko Kolev
>            Assignee: Ben O'Day
>            Priority: Minor
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3906.patch
>
>
> Currently the consumer and producer names in JMX have a name based on their java instance [1]. Due to this it is not obvious what is the endpoint  of the consumers/producers.
> It can be improved to use name in the JMX tree based on endpoint URI of the consumer/producer endpoints (combined with identityHashcode) to help in the overview to faster spot the desired consumer.
> [1] Copy/paste from the DefaultManagementNamingStrategy
> ...
>    String name = consumer.getClass().getSimpleName();
>         if (ObjectHelper.isEmpty(name)) {
>             name = "Consumer";
>         }
>         buffer.append(KEY_NAME + "=")
>             .append(name)
>             .append("(").append(ObjectHelper.getIdentityHashCode(consumer)).append(")");
> ...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Issue Comment Edited] (CAMEL-3906) Consumer and Producer names in JMX

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-3906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13030855#comment-13030855 ] 

Claus Ibsen edited comment on CAMEL-3906 at 5/9/11 6:51 PM:
------------------------------------------------------------

The problem with this patch is that your hardlock the route label when the MBean gets enlisted. If the route is later stopped, and the processor is adjusted, then the MBean would potential be misleading.

Also the labels can get long and complicated. If you use an aggregator etc.

Also you can potentially have clashes if there are multiple routes with similar routes.
You frankly need the identify hash code.


I have though about adding a /routeX in the MBean key if its part of a route. Then you would have a tree like

+ consumers
\- route1
\- route2

Then its maybe quicker to find the consumer you are looking for.


      was (Author: davsclaus):
    The problem with this patch is that your hardlock the route label when the MBean gets enlisted. If the route is later stopped, and the processor is adjusted, then the MBean would potential be misleading.

Also the labels can get long and complicated. If you use an aggregator etc.

Also you can potentially have clashes if there are multiple routes with similar routes.
You frankly need the identify hash code.


I have though about adding a /routeX in the MBean key if its part of a route. Then you would have a tree like

+ consumers
   + route1
   + route2

Then its maybe quicker to find the consumer you are looking for.

  
> Consumer and Producer names in JMX
> ----------------------------------
>
>                 Key: CAMEL-3906
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3906
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Mitko Kolev
>            Assignee: Ben O'Day
>            Priority: Minor
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3906.patch
>
>
> Currently the consumer and producer names in JMX have a name based on their java instance [1]. Due to this it is not obvious what is the endpoint  of the consumers/producers.
> It can be improved to use name in the JMX tree based on endpoint URI of the consumer/producer endpoints (combined with identityHashcode) to help in the overview to faster spot the desired consumer.
> [1] Copy/paste from the DefaultManagementNamingStrategy
> ...
>    String name = consumer.getClass().getSimpleName();
>         if (ObjectHelper.isEmpty(name)) {
>             name = "Consumer";
>         }
>         buffer.append(KEY_NAME + "=")
>             .append(name)
>             .append("(").append(ObjectHelper.getIdentityHashCode(consumer)).append(")");
> ...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CAMEL-3906) Consumer and Producer names in JMX

Posted by "Claus Ibsen (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-3906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-3906:
-------------------------------

    Fix Version/s:     (was: 2.9.0)
                   2.10
    
> Consumer and Producer names in JMX
> ----------------------------------
>
>                 Key: CAMEL-3906
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3906
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Mitko Kolev
>            Assignee: Ben O'Day
>            Priority: Minor
>             Fix For: 2.10
>
>         Attachments: CAMEL-3906.patch
>
>
> Currently the consumer and producer names in JMX have a name based on their java instance [1]. Due to this it is not obvious what is the endpoint  of the consumers/producers.
> It can be improved to use name in the JMX tree based on endpoint URI of the consumer/producer endpoints (combined with identityHashcode) to help in the overview to faster spot the desired consumer.
> [1] Copy/paste from the DefaultManagementNamingStrategy
> ...
>    String name = consumer.getClass().getSimpleName();
>         if (ObjectHelper.isEmpty(name)) {
>             name = "Consumer";
>         }
>         buffer.append(KEY_NAME + "=")
>             .append(name)
>             .append("(").append(ObjectHelper.getIdentityHashCode(consumer)).append(")");
> ...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-3906) Consumer and Producer names in JMX

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-3906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13030855#comment-13030855 ] 

Claus Ibsen commented on CAMEL-3906:
------------------------------------

The problem with this patch is that your hardlock the route label when the MBean gets enlisted. If the route is later stopped, and the processor is adjusted, then the MBean would potential be misleading.

Also the labels can get long and complicated. If you use an aggregator etc.

Also you can potentially have clashes if there are multiple routes with similar routes.
You frankly need the identify hash code.


I have though about adding a /routeX in the MBean key if its part of a route. Then you would have a tree like

+ consumers
   + route1
   + route2

Then its maybe quicker to find the consumer you are looking for.


> Consumer and Producer names in JMX
> ----------------------------------
>
>                 Key: CAMEL-3906
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3906
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Mitko Kolev
>            Assignee: Ben O'Day
>            Priority: Minor
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3906.patch
>
>
> Currently the consumer and producer names in JMX have a name based on their java instance [1]. Due to this it is not obvious what is the endpoint  of the consumers/producers.
> It can be improved to use name in the JMX tree based on endpoint URI of the consumer/producer endpoints (combined with identityHashcode) to help in the overview to faster spot the desired consumer.
> [1] Copy/paste from the DefaultManagementNamingStrategy
> ...
>    String name = consumer.getClass().getSimpleName();
>         if (ObjectHelper.isEmpty(name)) {
>             name = "Consumer";
>         }
>         buffer.append(KEY_NAME + "=")
>             .append(name)
>             .append("(").append(ObjectHelper.getIdentityHashCode(consumer)).append(")");
> ...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira