Uploaded image for project: 'HAL'
  1. HAL
  2. HAL-388

Console uses hardcoded hornetq-server name as "default"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 2.4.0
    • None
    • Subsystem Monitoring
    • None
    • Hide

      Use CLI command to navigate the hornetQ subsystem:

      /subsystem=messaging/hornetq-server=testing/jms-queue=*:read-resource(include-runtime=true,include-defaults=true)
      

      Or use Json based management option like following:

       curl --digest -L -D - http://admin:admin_123@localhost:9990/management/ -d '{"operation":"read-resource","address":[{"subsystem":"messaging"},{"hornetq-server":"testing"},{"jms-queue":"*"}],"include-runtime":true, "include-defaults":true, "json.pretty":1}' -HContent-Type:application/json
      
      Show
      Use CLI command to navigate the hornetQ subsystem: /subsystem=messaging/hornetq-server=testing/jms-queue=*:read-resource(include-runtime= true ,include-defaults= true ) Or use Json based management option like following: curl --digest -L -D - http: //admin:admin_123@localhost:9990/management/ -d '{ "operation" : "read-resource" , "address" :[{ "subsystem" : "messaging" },{ "hornetq-server" : "testing" },{ "jms-queue" : "*" }], "include-runtime" : true , "include-defaults" : true , "json.pretty" :1}' -HContent-Type:application/json

    Description

      Looks like the API [1] is using hardcoded hornetQ server name as "default" inside the "QueueMetrics.java" as following:

         final HelpSystem.AddressCallback addressCallback = new HelpSystem.AddressCallback() {
                  @Override
                  public ModelNode getAddress() {
                      ModelNode address = new ModelNode();
                      address.get(ModelDescriptionConstants.ADDRESS).set(RuntimeBaseAddress.get());
                      address.get(ModelDescriptionConstants.ADDRESS).add("subsystem", "messaging");
                      address.get(ModelDescriptionConstants.ADDRESS).add("hornetq-server", "default");
                      address.get(ModelDescriptionConstants.ADDRESS).add("jms-queue", "*");
                      return address;
                  }
              };
      
      • Above is causing issue if someone alters the "Hornetq-server" name to something else. In that case the Console will not be able to display the QueueMetrics for any JMS Queue or Topic.
      • See attached Screenshot with the When the HornetQ server name was changed to "testing"
              <subsystem xmlns="urn:jboss:domain:messaging:2.0">
                  <hornetq-server name="testing">
                   .
                   .
                  </hornetq-server>
              </subsystem>
      

      [1] https://github.com/hal/core/blob/master/gui/src/main/java/org/jboss/as/console/client/shared/runtime/jms/QueueMetrics.java

      Attachments

        Activity

          People

            rhn-support-hbraun Heiko Braun
            jaysensharma Jay SenSharma (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: