andytaylor commented on code in PR #4183: URL: https://github.com/apache/activemq-artemis/pull/4183#discussion_r993260733
########## artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/TargetAddressInfo.java: ########## @@ -0,0 +1,35 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.activemq.artemis.core.server.impl; + + +import java.util.concurrent.atomic.AtomicLong; + +class TargetAddressInfo { + private AtomicLong messagesSent = new AtomicLong(1); + + private AtomicLong messagesSizeSent = new AtomicLong(0); Review Comment: fixed ########## artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java: ########## @@ -2752,7 +2754,24 @@ public String listAllConsumersAsJSON() throws Exception { } private JsonObject toJSONObject(ServerConsumer consumer) throws Exception { - JsonObjectBuilder obj = JsonLoader.createObjectBuilder().add("consumerID", consumer.getID()).add("connectionID", consumer.getConnectionID().toString()).add("sessionID", consumer.getSessionID()).add("queueName", consumer.getQueue().getName().toString()).add("browseOnly", consumer.isBrowseOnly()).add("creationTime", consumer.getCreationTime()).add("deliveringCount", consumer.getDeliveringMessages().size()); + List<MessageReference> deliveringMessages = consumer.getDeliveringMessages(); + JsonObjectBuilder obj = JsonLoader.createObjectBuilder() + .add(ConsumerField.ID.getAlternativeName(), consumer.getID()) + .add(ConsumerField.CONNECTION.getAlternativeName(), consumer.getConnectionID().toString()) + .add(ConsumerField.SESSION.getAlternativeName(), consumer.getSessionID()) + .add(ConsumerField.QUEUE.getAlternativeName(), consumer.getQueue().getName().toString()) + .add(ConsumerField.BROWSE_ONLY.getName(), consumer.isBrowseOnly()) + .add(ConsumerField.CREATION_TIME.getName(), consumer.getCreationTime()) + // deliveringCount is renamed as MESSAGES_IN_TRANSIT but left in json for backward compatibility + .add(ConsumerField.MESSAGES_IN_TRANSIT.getAlternativeName(), consumer.getMessagesInTransit()) + .add(ConsumerField.MESSAGES_IN_TRANSIT.getName(), consumer.getMessagesInTransit()) Review Comment: test added -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
