mattrpav commented on code in PR #2766:
URL: https://github.com/apache/activemq/pull/2766#discussion_r4413971298


##########
activemq-client/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java:
##########
@@ -392,6 +393,15 @@ protected ActiveMQConnection 
createActiveMQConnection(String userName, String pa
 
             configureConnection(connection);
 
+            // The failover reconnect task is created on first use, so the 
connection level
+            // virtual thread preference has to reach the transport before it 
starts
+            if (isUseVirtualThreadTaskRunner()) {

Review Comment:
   The 'last' set wins. If a setup as .setBrokerURL(... 
?jms.useVirtualThreadTaskRunner=true and then 
.setUseVirtualThreadTaskRunner(false), the value would be 'false'.
   
   One tweak we could do is to convert the FailoverTransport to be a Boolean 
tri-state. That would allow a failover:// uri parameter to 'win'.
   
   Example:
   
   ConnectionFactory uri parameter:
   ```
   
failover:(tcp://broker1:61616,tcp://broker2:61616)?jms.useVirtualThreadTaskRunner=true
   ```
   
   failover uri paramter:
   ```
   
failover:(tcp://broker1:61616,tcp://broker2:61616)?useVirtualThreadTaskRunner=true
   ```



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to