jbertram commented on a change in pull request #2976: ARTEMIS-2325 + a test fix
URL: https://github.com/apache/activemq-artemis/pull/2976#discussion_r377905626
 
 

 ##########
 File path: 
artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerImpl.java
 ##########
 @@ -138,24 +135,19 @@ public void send(SimpleString address1,
                     Message message,
                     SendAcknowledgementHandler handler) throws 
ActiveMQException {
       checkClosed();
-      boolean confirmationWindowEnabled = 
session.isConfirmationWindowEnabled();
-      if (confirmationWindowEnabled) {
-         doSend(address1, message, handler);
-      } else {
-         doSend(address1, message, null);
-         if (handler != null) {
-            if (logger.isDebugEnabled()) {
-               logger.debug("Handler was used on producing messages towards 
address " + (address1 == null ? null : address1.toString()) + " however there 
is no confirmationWindowEnabled");
-            }
+      if (handler != null) {
+         handler = new SendAcknowledgementHandlerWrapper(handler);
 
 Review comment:
   No, it won't create a new object for every message send. It will only create 
a wrapper for the handler if a handler is set when a message is sent.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to