tabish121 commented on code in PR #5220: URL: https://github.com/apache/activemq-artemis/pull/5220#discussion_r1747364347
########## artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/AMQPBrokerConnection.java: ########## @@ -432,11 +432,29 @@ private void doConnect() { final boolean coreTunnelingEnabled = isCoreMessageTunnelingEnabled(replica); final Symbol[] desiredCapabilities; - if (coreTunnelingEnabled) { - desiredCapabilities = new Symbol[] {AMQPMirrorControllerSource.MIRROR_CAPABILITY, - AmqpSupport.CORE_MESSAGE_TUNNELING_SUPPORT}; - } else { - desiredCapabilities = new Symbol[] {AMQPMirrorControllerSource.MIRROR_CAPABILITY}; + if (!replica.isForward()){ Review Comment: Once you get to this level of complexity to manage the elements in the desired capabilities I'd suggest just switch to creating an ArrayList and adding the elements individually based on the configuration and then just doing a toArray() on that to get the final capabilities array. ########## artemis-server/src/main/java/org/apache/activemq/artemis/core/config/amqpBrokerConnectivity/AMQPMirrorBrokerConnectionElement.java: ########## @@ -75,6 +77,12 @@ public AMQPMirrorBrokerConnectionElement setQueueCreation(boolean queueCreation) return this; } + public boolean isForward () { return forward; } Review Comment: I'd rather this use the same formatting as other accessors and not jam it all on one line, and also space things as others are done 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-unsubscr...@activemq.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org For additional commands, e-mail: gitbox-h...@activemq.apache.org For further information, visit: https://activemq.apache.org/contact