mirror of https://github.com/apache/activemq.git
Add option to turn on an OpenWire TCP endpoint.
This commit is contained in:
parent
ff64b14bc7
commit
b83a3d4388
|
@ -64,6 +64,7 @@ public class AmqpTestSupport {
|
|||
protected int sslPort;
|
||||
protected int nioPort;
|
||||
protected int nioPlusSslPort;
|
||||
protected int openwirePort;
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
final AmqpTestSupport s = new AmqpTestSupport();
|
||||
|
@ -123,6 +124,12 @@ public class AmqpTestSupport {
|
|||
protected void addAMQPConnector() throws Exception {
|
||||
TransportConnector connector = null;
|
||||
|
||||
if (isUseOpenWireConnector()) {
|
||||
connector = brokerService.addConnector(
|
||||
"tcp://0.0.0.0:" + openwirePort);
|
||||
openwirePort = connector.getConnectUri().getPort();
|
||||
LOG.debug("Using openwire port " + openwirePort);
|
||||
}
|
||||
if (isUseTcpConnector()) {
|
||||
connector = brokerService.addConnector(
|
||||
"amqp://0.0.0.0:" + port + "?transport.transformer=" + getAmqpTransformer());
|
||||
|
@ -149,6 +156,10 @@ public class AmqpTestSupport {
|
|||
}
|
||||
}
|
||||
|
||||
protected boolean isUseOpenWireConnector() {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected boolean isUseTcpConnector() {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue