andytaylor commented on code in PR #4183:
URL: https://github.com/apache/activemq-artemis/pull/4183#discussion_r1067122461


##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerProducerImpl.java:
##########
@@ -18,23 +18,50 @@
 
 import org.apache.activemq.artemis.core.server.ServerProducer;
 
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.atomic.AtomicLongFieldUpdater;
+
 public class ServerProducerImpl implements ServerProducer {
-   private final String ID;
+
+   private static final AtomicLong PRODUCER_ID_GENERATOR = new AtomicLong();
+
+   private final long ID;
+   private String name;
    private final String protocol;
    private final long creationTime;
+   private volatile long messagesSent = 0;
+   private volatile long messagesSentSize = 0;
+
+   AtomicLongFieldUpdater<ServerProducerImpl> messagesSentUpdater = 
AtomicLongFieldUpdater.newUpdater(ServerProducerImpl.class, "messagesSent");
 
+   AtomicLongFieldUpdater<ServerProducerImpl> messagesSentSizeUpdater = 
AtomicLongFieldUpdater.newUpdater(ServerProducerImpl.class, "messagesSentSize");

Review Comment:
   fixed



-- 
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]

Reply via email to