Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-2078

AMQX ignores some method calls like isLastValue, getUser, getPersistentSize, getDurablePersistentSize

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • management
    • None
    • AMQ Broker 1842

      There is a list of exclude methods that "corrupt" usage of amqx client.
      This blacklist is used to not call some methods in relfection of calling

      //            Object invokedObject = method.invoke(object); -> changed to custom imp to workaround issue
                  Object invokedObject = proxyHandler.invoke(object, method, null);
      ...
          @Override
          public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
              System.out.println("Inside the invocation handler for: " + method.getName());
              try {
                  return method.invoke(delegate, args);
              } catch (InvocationTargetException e) {
                  throw e.getCause();
              }
      

      But this still ignores some methods

      ...
      Inside the invocation handler for: isPaused
      Inside the invocation handler for: isTemporary
      Inside the invocation handler for: getUser
      javax.management.AttributeNotFoundException: No such attribute: User
      Inside the invocation handler for: isDurable
      Inside the invocation handler for: getRoutingType
      Inside the invocation handler for: getPersistentSize
      javax.management.AttributeNotFoundException: No such attribute: PersistentSize
      Inside the invocation handler for: getDurableMessageCount
      javax.management.AttributeNotFoundException: No such attribute: DurableMessageCount
      Inside the invocation handler for: getDurablePersistentSize
      javax.management.AttributeNotFoundException: No such attribute: DurablePersistentSize
      Inside the invocation handler for: getScheduledCount
      Inside the invocation handler for: getScheduledSize
      javax.management.AttributeNotFoundException: No such attribute: ScheduledSize
      Inside the invocation handler for: getDurableScheduledCount
      javax.management.AttributeNotFoundException: No such attribute: DurableScheduledCount
      Inside the invocation handler for: getDurableScheduledSize
      javax.management.AttributeNotFoundException: No such attribute: DurableScheduledSize
      Inside the invocation handler for: getConsumerCount
      Inside the invocation handler for: getDeliveringCount
      Inside the invocation handler for: getDeliveringSize
      javax.management.AttributeNotFoundException: No such attribute: DeliveringSize
      Inside the invocation handler for: getDurableDeliveringCount
      javax.management.AttributeNotFoundException: No such attribute: DurableDeliveringCount
      Inside the invocation handler for: getDurableDeliveringSize
      javax.management.AttributeNotFoundException: No such attribute: DurableDeliveringSize
      Inside the invocation handler for: getMessagesAdded
      Inside the invocation handler for: getMessagesAcknowledged
      ...
      

      For some strange reason, these methods throw InvocationTargetException error.
      I will probably need help from some java-guy fnigro or mtaylor1@redhat.com on this.

      https://bitbucket.org/msgqe/dtests/src/140c9ed3066aa75499ff7f661f741762971dcc6e/dtests/node_data/clients/java/amqx/src/main/java/com/redhat/amqx/management/ObjectReader.java#lines-82

      Current changes https://bitbucket.org/msgqe/dtests/commits/41d51533632ac375e28087ecf87dd46402dd6799?at=mt_amqx

            mtoth@redhat.com Michal Toth
            mtoth@redhat.com Michal Toth
            Francesco Nigro, Jiri Daněk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 1 day
                1d
                Remaining:
                Time Spent - 2 hours Remaining Estimate - 2 hours
                2h
                Logged:
                Time Spent - 2 hours Remaining Estimate - 2 hours Time Not Required
                2h