mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-4719 - allowLinkStealing was not set/used properly by default on mqtt connector
This commit is contained in:
parent
6dd47bb63f
commit
c99e2d8372
|
@ -90,9 +90,6 @@ public class TransportConnector implements Connector, BrokerServiceAware {
|
|||
setEnableStatusMonitor(false);
|
||||
}
|
||||
}
|
||||
if (server != null){
|
||||
setAllowLinkStealing(server.isAllowLinkStealing());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -582,7 +579,7 @@ public class TransportConnector implements Connector, BrokerServiceAware {
|
|||
|
||||
@Override
|
||||
public boolean isAllowLinkStealing() {
|
||||
return allowLinkStealing;
|
||||
return server.isAllowLinkStealing();
|
||||
}
|
||||
|
||||
public void setAllowLinkStealing (boolean allowLinkStealing) {
|
||||
|
|
|
@ -19,6 +19,7 @@ package org.apache.activemq.transport.mqtt;
|
|||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.security.ProtectionDomain;
|
||||
import java.security.SecureRandom;
|
||||
import java.security.cert.CertificateException;
|
||||
|
@ -157,6 +158,7 @@ public class MQTTTestSupport {
|
|||
|
||||
brokerService.start();
|
||||
brokerService.waitUntilStarted();
|
||||
port = brokerService.getTransportConnectorByName("mqtt").getConnectUri().getPort();
|
||||
}
|
||||
|
||||
protected void applyMemoryLimitPolicy() throws Exception {
|
||||
|
@ -214,7 +216,11 @@ public class MQTTTestSupport {
|
|||
connectorURI.append("?").append(protocolConfig);
|
||||
}
|
||||
|
||||
port = brokerService.addConnector(connectorURI.toString()).getConnectUri().getPort();
|
||||
TransportConnector connector = new TransportConnector();
|
||||
connector.setUri(new URI(connectorURI.toString()));
|
||||
connector.setName("mqtt");
|
||||
brokerService.addConnector(connector);
|
||||
|
||||
LOG.info("Added connector {} to broker", getProtocolScheme());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue