You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2023/01/12 16:49:31 UTC

[GitHub] [activemq-artemis] clebertsuconic commented on a diff in pull request #4183: ARTEMIS-3875 - adding consumer and producer metrics

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


##########
artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionImpl.java:
##########
@@ -2026,10 +2028,20 @@ private ClientProducer internalCreateProducer(final SimpleString address,
                                                  final int maxRate) throws ActiveMQException {
       checkClosed();
 
-      ClientProducerInternal producer = new ClientProducerImpl(this, address, maxRate == -1 ? null : new TokenBucketLimiterImpl(maxRate, false), autoCommitSends && blockOnNonDurableSend, autoCommitSends && blockOnDurableSend, autoGroup, groupID == null ? null : new SimpleString(groupID), minLargeMessageSize, sessionContext);
+      ClientProducerInternal producer = new ClientProducerImpl(this,
+                                                                      address,
+                                                                      maxRate == -1 ? null : new TokenBucketLimiterImpl(maxRate, false),
+                                                  autoCommitSends && blockOnNonDurableSend,
+                                                     autoCommitSends && blockOnDurableSend,
+                                                                      autoGroup, groupID == null ? null : new SimpleString(groupID),
+                                                                      minLargeMessageSize,
+                                                                      sessionContext,
+                                                                      producerIDs.getAndIncrement());

Review Comment:
   I also prefer incrementAndGet(). as a matter of fact I never seen the opposite (getAndIncrement)
   
   I know it's just a preference, but if we could use incrementAndGet just to be consistent that would be my choice here.



-- 
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: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org