mirror of
https://github.com/apache/activemq.git
synced 2025-02-09 03:25:33 +00:00
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 sslPort;
|
||||||
protected int nioPort;
|
protected int nioPort;
|
||||||
protected int nioPlusSslPort;
|
protected int nioPlusSslPort;
|
||||||
|
protected int openwirePort;
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
final AmqpTestSupport s = new AmqpTestSupport();
|
final AmqpTestSupport s = new AmqpTestSupport();
|
||||||
@ -123,6 +124,12 @@ public class AmqpTestSupport {
|
|||||||
protected void addAMQPConnector() throws Exception {
|
protected void addAMQPConnector() throws Exception {
|
||||||
TransportConnector connector = null;
|
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()) {
|
if (isUseTcpConnector()) {
|
||||||
connector = brokerService.addConnector(
|
connector = brokerService.addConnector(
|
||||||
"amqp://0.0.0.0:" + port + "?transport.transformer=" + getAmqpTransformer());
|
"amqp://0.0.0.0:" + port + "?transport.transformer=" + getAmqpTransformer());
|
||||||
@ -149,6 +156,10 @@ public class AmqpTestSupport {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected boolean isUseOpenWireConnector() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
protected boolean isUseTcpConnector() {
|
protected boolean isUseTcpConnector() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user