Description
Use case:
- create a JMS connection factory with a single connector name
=> its URI is tcp://localhost:8080?&blockOnNonDurableSend=false&retryIntervalMultiplier=1.0&maxRetryInterval=2000&producerMaxRate=-1&blockOnDurableSend=true&connectionTTL=60000&compressLargeMessage=false&reconnectAttempts=0&cacheLargeMessagesClient=false&scheduledThreadPoolMaxSize=5&useGlobalPools=true&callFailoverTimeout=-1&initialConnectAttempts=1&clientFailureCheckPeriod=30000&blockOnAcknowledge=false&consumerWindowSize=1048576&minLargeMessageSize=102400&autoGroup=false&threadPoolMaxSize=30&confirmationWindowSize=-1&transactionBatchSize=1048576&callTimeout=30000&preAcknowledge=false&connectionLoadBalancingPolicyClassName=org.apache.activemq.artemis.api.core.client.loadbalance.RoundRobinConnectionLoadBalancingPolicy&dupsOKBatchSize=1048576&initialMessagePacketSize=1500&consumerMaxRate=-1&retryInterval=2000&failoverOnInitialConnection=false&producerWindowSize=65536&host=localhost&http-upgrade-endpoint=http-acceptor&httpUpgradeEnabled=true&port=8080#
- look it up from JNDI
- the looked up ActiveMQConnectionFactory contains 2 TransportConfigurations: a correct one and a bogus one (with port = -1)
The bug is in org.apache.activemq.artemis.uri.TCPTransportConfigurationSchema#getTransportConfigurations.
The statement String connectors = uri.getFragment() returns an empty string.
So when calling connectors.split(","), it will add another TransportConfiguration based on an empty extraURI