merge #110 - Distribution config
This commit is contained in:
commit
e52622cffa
|
@ -97,10 +97,10 @@ public class URIFactory<T, P>
|
|||
/*
|
||||
* this method is used to change a string with multiple URI's in it into a valid URI.
|
||||
* for instance it is possible to have the following String
|
||||
* (tcp://localhost:5445,tcp://localhost:5545,tcp://localhost:5555)?somequery
|
||||
* (tcp://localhost:61616,tcp://localhost:5545,tcp://localhost:5555)?somequery
|
||||
* This is an invalid URI so will be changed so that the first URI is used and the
|
||||
* extra ones added as part of the URI fragment, like so
|
||||
* tcp://localhost:5445?someQuery#tcp://localhost:5545,tcp://localhost:5555.
|
||||
* tcp://localhost:61616?someQuery#tcp://localhost:5545,tcp://localhost:5555.
|
||||
*
|
||||
* It is the job of the URISchema implementation to handle these fragments as needed.
|
||||
* */
|
||||
|
|
|
@ -36,7 +36,7 @@ import org.apache.activemq.utils.UUIDGenerator;
|
|||
* <pre>
|
||||
* HashMap<String, Object> map = new HashMap<String, Object>();
|
||||
* map.put("host", "localhost");
|
||||
* map.put("port", 5445);
|
||||
* map.put("port", 61616);
|
||||
* TransportConfiguration config = new TransportConfiguration(InVMConnectorFactory.class.getName(), map);
|
||||
* ClientSessionFactory sf = new ClientSessionFactoryImpl(config);
|
||||
* </pre>
|
||||
|
|
|
@ -131,7 +131,7 @@ public class TransportConstants
|
|||
|
||||
public static final String DEFAULT_HOST = "localhost";
|
||||
|
||||
public static final int DEFAULT_PORT = 5445;
|
||||
public static final int DEFAULT_PORT = 61616;
|
||||
|
||||
public static final String DEFAULT_LOCAL_ADDRESS = null;
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ public class TCPServerLocatorSchema extends AbstractServerLocatorSchema
|
|||
{
|
||||
return Integer.valueOf((String) port);
|
||||
}
|
||||
return port != null ? (int) port : 5445;
|
||||
return port != null ? (int) port : 61616;
|
||||
}
|
||||
|
||||
private static String getHost(Map<String, Object> params)
|
||||
|
|
|
@ -142,13 +142,13 @@ public class ConnectionFactoryURITest
|
|||
Map<String, Object> props = new HashMap<>();
|
||||
Set<String> allowableConnectorKeys = TransportConstants.ALLOWABLE_CONNECTOR_KEYS;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("(tcp://localhost0:5445?");//localhost1:5446,localhost2:5447,localhost3:5448)&ha=true");
|
||||
sb.append("(tcp://localhost0:61616?");//localhost1:61617,localhost2:61618,localhost3:61619)&ha=true");
|
||||
populateConnectorParams(props, allowableConnectorKeys, sb);
|
||||
Map<String, Object> props2 = new HashMap<>();
|
||||
sb.append(",tcp://localhost1:5446?");
|
||||
sb.append(",tcp://localhost1:61617?");
|
||||
populateConnectorParams(props2, allowableConnectorKeys, sb);
|
||||
Map<String, Object> props3 = new HashMap<>();
|
||||
sb.append(",tcp://localhost2:5447?");
|
||||
sb.append(",tcp://localhost2:61618?");
|
||||
populateConnectorParams(props3, allowableConnectorKeys, sb);
|
||||
sb.append(")?ha=true&clientID=myID");
|
||||
|
||||
|
@ -165,7 +165,7 @@ public class ConnectionFactoryURITest
|
|||
{
|
||||
TransportConfiguration connector = staticConnector;
|
||||
Assert.assertEquals(connector.getParams().get("host"), "localhost" + offfSet);
|
||||
Assert.assertEquals(connector.getParams().get("port"), "" + (5445 + offfSet));
|
||||
Assert.assertEquals(connector.getParams().get("port"), "" + (61616 + offfSet));
|
||||
Map<String, Object> params = connector.getParams();
|
||||
for (Map.Entry<String, Object> entry : params.entrySet())
|
||||
{
|
||||
|
@ -195,11 +195,11 @@ public class ConnectionFactoryURITest
|
|||
TransportConfiguration tc = new TransportConfiguration(NettyConnectorFactory.class.getName());
|
||||
HashMap<String, Object> params = new HashMap<>();
|
||||
params.put("host", "localhost1");
|
||||
params.put("port", 5446);
|
||||
params.put("port", 61617);
|
||||
TransportConfiguration tc2 = new TransportConfiguration(NettyConnectorFactory.class.getName(), params);
|
||||
HashMap<String, Object> params2 = new HashMap<>();
|
||||
params2.put("host", "localhost2");
|
||||
params2.put("port", 5447);
|
||||
params2.put("port", 61618);
|
||||
TransportConfiguration tc3 = new TransportConfiguration(NettyConnectorFactory.class.getName(), params2);
|
||||
ActiveMQConnectionFactory connectionFactoryWithHA = ActiveMQJMSClient.createConnectionFactoryWithHA(JMSFactoryType.CF, tc, tc2, tc3);
|
||||
URI tcp = parser.createSchema("tcp", connectionFactoryWithHA);
|
||||
|
|
|
@ -32,7 +32,7 @@ import javax.xml.bind.annotation.XmlValue;
|
|||
@XmlAccessorType(XmlAccessType.PROPERTY)
|
||||
public class XmlHttpHeader implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = -390039194544718601L;
|
||||
private static final long serialVersionUID = -3900391946161818601L;
|
||||
private String name;
|
||||
private String value;
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ public class FileConfigurationParserTest extends UnitTestCase
|
|||
"<large-messages-directory>${jboss.server.data.dir}/activemq/largemessages</large-messages-directory>" + "\n" +
|
||||
"<paging-directory>${jboss.server.data.dir}/activemq/paging</paging-directory>" + "\n" +
|
||||
"<connectors>" + "\n" +
|
||||
"<connector name=\"netty\">tcp://localhost:5445</connector>" + "\n" +
|
||||
"<connector name=\"netty\">tcp://localhost:61616</connector>" + "\n" +
|
||||
"<connector name=\"netty-throughput\">tcp://localhost:5545</connector>" + "\n" +
|
||||
"<connector name=\"in-vm\">vm://0</connector>" + "\n" +
|
||||
"</connectors>" + "\n" +
|
||||
|
|
|
@ -75,7 +75,7 @@ public class WrongRoleFileConfigurationParserTest extends UnitTestCase
|
|||
"<large-messages-directory>${jboss.server.data.dir}/activemq/largemessages</large-messages-directory>" + "\n" +
|
||||
"<paging-directory>${jboss.server.data.dir}/activemq/paging</paging-directory>" + "\n" +
|
||||
"<connectors>" + "\n" +
|
||||
"<connector name=\"netty\">tcp://localhost:5445</connector>" + "\n" +
|
||||
"<connector name=\"netty\">tcp://localhost:61616</connector>" + "\n" +
|
||||
"<connector name=\"netty-throughput\">tcp://localhost:5545</connector>" + "\n" +
|
||||
"<connector name=\"in-vm\">vm://0</connector>" + "\n" +
|
||||
"</connectors>" + "\n" +
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
<connector name="connector2">vm://5</connector>
|
||||
</connectors>
|
||||
<acceptors>
|
||||
<acceptor>tcp://0.0.0.0:5445?tcpNoDelay=456;connectionTtl=44</acceptor>
|
||||
<acceptor>tcp://0.0.0.0:61616?tcpNoDelay=456;connectionTtl=44</acceptor>
|
||||
<acceptor>vm://0?e1=z1;e2=567</acceptor>
|
||||
</acceptors>
|
||||
<broadcast-groups>
|
||||
|
|
|
@ -71,11 +71,11 @@
|
|||
</remoting-incoming-interceptors>
|
||||
|
||||
<connectors>
|
||||
<connector name="connector1">tcp://localhost:5445</connector>
|
||||
<connector name="connector1">tcp://localhost:61616</connector>
|
||||
<connector name="connector2">vm://0</connector>
|
||||
</connectors>
|
||||
<acceptors>
|
||||
<acceptor name="acceptor1">tcp://localhost:5445</acceptor>
|
||||
<acceptor name="acceptor1">tcp://localhost:61616</acceptor>
|
||||
<acceptor name="acceptor2">vm://0</acceptor>
|
||||
</acceptors>
|
||||
|
||||
|
|
|
@ -71,11 +71,11 @@
|
|||
</remoting-incoming-interceptors>
|
||||
|
||||
<connectors>
|
||||
<connector name="connector1">tcp://localhost:5445</connector>
|
||||
<connector name="connector1">tcp://localhost:61616</connector>
|
||||
<connector name="connector2">vm://0</connector>
|
||||
</connectors>
|
||||
<acceptors>
|
||||
<acceptor name="acceptor1">tcp://localhost:5445</acceptor>
|
||||
<acceptor name="acceptor1">tcp://localhost:61616</acceptor>
|
||||
<acceptor name="acceptor2">vm://0</acceptor>
|
||||
</acceptors>
|
||||
|
||||
|
|
|
@ -71,11 +71,11 @@
|
|||
</remoting-incoming-interceptors>
|
||||
|
||||
<connectors>
|
||||
<connector name="connector1">tcp://localhost:5445</connector>
|
||||
<connector name="connector1">tcp://localhost:61616</connector>
|
||||
<connector name="connector2">vm://0</connector>
|
||||
</connectors>
|
||||
<acceptors>
|
||||
<acceptor name="acceptor1">tcp://localhost:5445</acceptor>
|
||||
<acceptor name="acceptor1">tcp://localhost:61616</acceptor>
|
||||
<acceptor name="acceptor2">vm://0</acceptor>
|
||||
</acceptors>
|
||||
|
||||
|
|
|
@ -71,11 +71,11 @@
|
|||
</remoting-incoming-interceptors>
|
||||
|
||||
<connectors>
|
||||
<connector name="connector1">tcp://localhost:5445</connector>
|
||||
<connector name="connector1">tcp://localhost:61616</connector>
|
||||
<connector name="connector2">vm://0</connector>
|
||||
</connectors>
|
||||
<acceptors>
|
||||
<acceptor name="acceptor1">tcp://localhost:5445</acceptor>
|
||||
<acceptor name="acceptor1">tcp://localhost:61616</acceptor>
|
||||
<acceptor>vm://0</acceptor>
|
||||
</acceptors>
|
||||
|
||||
|
|
|
@ -71,11 +71,11 @@
|
|||
</remoting-incoming-interceptors>
|
||||
|
||||
<connectors>
|
||||
<connector name="connector1">tcp://localhost:5445</connector>
|
||||
<connector name="connector1">tcp://localhost:61616</connector>
|
||||
<connector name="connector2">vm://0</connector>
|
||||
</connectors>
|
||||
<acceptors>
|
||||
<acceptor name="acceptor1">tcp://localhost:5445</acceptor>
|
||||
<acceptor name="acceptor1">tcp://localhost:61616</acceptor>
|
||||
<acceptor name="acceptor2">vm://0</acceptor>
|
||||
</acceptors>
|
||||
|
||||
|
|
|
@ -71,11 +71,11 @@
|
|||
</remoting-incoming-interceptors>
|
||||
|
||||
<connectors>
|
||||
<connector name="connector1">tcp://localhost:5445</connector>
|
||||
<connector name="connector1">tcp://localhost:61616</connector>
|
||||
<connector name="connector2">vm://0</connector>
|
||||
</connectors>
|
||||
<acceptors>
|
||||
<acceptor name="acceptor1">tcp://localhost:5445</acceptor>
|
||||
<acceptor name="acceptor1">tcp://localhost:61616</acceptor>
|
||||
<acceptor name="acceptor2">vm://0</acceptor>
|
||||
</acceptors>
|
||||
|
||||
|
|
|
@ -34,17 +34,17 @@
|
|||
<!-- Connectors -->
|
||||
|
||||
<connectors>
|
||||
<connector name="netty-connector">tcp://localhost:5445</connector>
|
||||
<connector name="netty-connector">tcp://localhost:61616</connector>
|
||||
|
||||
<!-- This connector corresponds to the New York server -->
|
||||
|
||||
<connector name="newyork-connector">tcp://localhost:5446</connector>
|
||||
<connector name="newyork-connector">tcp://localhost:61617</connector>
|
||||
</connectors>
|
||||
|
||||
<!-- Acceptors -->
|
||||
|
||||
<acceptors>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:5445</acceptor>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<!-- Divert configuration -->
|
||||
|
|
|
@ -37,13 +37,13 @@ import org.apache.activemq.api.core.TransportConfiguration;
|
|||
* you'll need something like this if the ActiveMQ Server is remote
|
||||
* <pre>
|
||||
* <property name="com.arjuna.ats.jta.recovery.XAResourceRecovery.ACTIVEMQ2"
|
||||
* value="org.apache.activemq.jms.server.recovery.ActiveMQXAResourceRecovery;org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory,guest,guest,host=localhost,port=5445"/>
|
||||
* value="org.apache.activemq.jms.server.recovery.ActiveMQXAResourceRecovery;org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory,guest,guest,host=localhost,port=61616"/>
|
||||
* </pre>
|
||||
* <p>
|
||||
* you'll need something like this if the ActiveMQ Server is remote and has failover configured
|
||||
* <pre>
|
||||
* <property name="com.arjuna.ats.jta.recovery.XAResourceRecovery.ACTIVEMQ2"
|
||||
* value="org.apache.activemq.jms.server.recovery.ActiveMQXAResourceRecovery;org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory,guest,guest,host=localhost,port=5445;org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory,guest,guest,host=localhost2,port=5446"/>
|
||||
* value="org.apache.activemq.jms.server.recovery.ActiveMQXAResourceRecovery;org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory,guest,guest,host=localhost,port=61616;org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory,guest,guest,host=localhost2,port=61617"/>
|
||||
* </pre>
|
||||
*
|
||||
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
|
||||
|
|
|
@ -95,8 +95,8 @@ for i in `ls $ACTIVEMQ_HOME/lib/*.jar`; do
|
|||
CLASSPATH=$i:$CLASSPATH
|
||||
done
|
||||
|
||||
source $ACTIVEMQ_HOME/bin/activemq.conf
|
||||
|
||||
JAVA_ARGS="-XX:+UseParallelGC -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -Xms512M -Xmx1024M -Dactivemq.home=$ACTIVEMQ_HOME -Ddata.dir=$ACTIVEMQ_HOME/data -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Dlogging.configuration=file:$ACTIVEMQ_HOME/config/logging.properties -Djava.library.path=$ACTIVEMQ_HOME/bin/lib/linux-i686:$ACTIVEMQ_HOME/bin/lib/linux-x86_64"
|
||||
#JAVA_ARGS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005"
|
||||
JAVA_ARGS="$JAVA_ARGS $ACTIVEMQ_CLUSTER_PROPS -Dactivemq.home=$ACTIVEMQ_HOME -Djava.library.path=$ACTIVEMQ_HOME/bin/lib/linux-i686:$ACTIVEMQ_HOME/bin/lib/linux-x86_64 -Ddata.dir=$ACTIVEMQ_DATA_DIR -Djava.util.logging.manager=$ACTIVEMQ_LOG_MANAGER -Dlogging.configuration=$ACTIVEMQ_LOGGING_CONF $DEBUG_ARGS"
|
||||
|
||||
exec "$JAVACMD" $JAVA_ARGS -classpath $CLASSPATH org.apache.activemq.cli.ActiveMQ $@
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
# Path to logging configuration file
|
||||
ACTIVEMQ_LOGGING_CONF="file:$ACTIVEMQ_HOME/config/logging.properties"
|
||||
|
||||
# Path to data directory
|
||||
ACTIVEMQ_DATA_DIR=$ACTIVEMQ_HOME/data
|
||||
|
||||
# Log manager class
|
||||
ACTIVEMQ_LOG_MANAGER=org.jboss.logmanager.LogManager
|
||||
|
||||
# Cluster Properties: Used to pass arguments to ActiveMQ which can be referenced in activemq-configuration.xml
|
||||
#ACTIVEMQ_CLUSTER_PROPS="-Dactivemq.remoting.netty.port=61618"
|
||||
|
||||
# Java Opts
|
||||
JAVA_ARGS="-XX:+UseParallelGC -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -Xms512M -Xmx1024M"
|
||||
|
||||
# Debug args: Uncomment to enable debug
|
||||
#DEBUG_ARGS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005"
|
|
@ -37,13 +37,22 @@ under the License.
|
|||
<large-messages-directory>${data.dir:../data}/large-messages</large-messages-directory>
|
||||
|
||||
<connectors>
|
||||
<connector name="netty">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.port:5445}</connector>
|
||||
<connector name="netty-throughput">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.batch.port:5455}?batchDelay=50</connector>
|
||||
<!-- Default Connector. Returned to clients during broadcast and distributed around cluster. See broadcast and discovery-groups -->
|
||||
<connector name="activemq">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.port:61616}</connector>
|
||||
</connectors>
|
||||
|
||||
<acceptors>
|
||||
<acceptor name="netty">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.port:5445}</acceptor>
|
||||
<acceptor name="netty-throughput">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.batch.port:5455}?batchDelay=50;directDeliver=false</acceptor>
|
||||
<!-- Default ActiveMQ Acceptor. Multi-protocol adapter. Currently supports Core, OpenWire, Stomp and AMQP -->
|
||||
<acceptor name="activemq">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.port:61616}</acceptor>
|
||||
|
||||
<!-- AMQP Connector. Listens on default AMQP port for AMQP traffic. -->
|
||||
<acceptor name="amqp">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.port:5672}?protocols=AMQP</acceptor>
|
||||
|
||||
<!-- STOMP Acceptor. Enables ActiveMQ Core protocol, OpenWire and STOMP. -->
|
||||
<acceptor name="stomp">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.port:61613}?protocols=STOMP</acceptor>
|
||||
|
||||
<!-- HornetQ Compatibility Acceptor. Enables ActiveMQ Core and STOMP for legacy HornetQ clients -->
|
||||
<acceptor name="hornetq">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.port:5445}?protocols=CORE,STOMP</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<broadcast-groups>
|
||||
|
@ -51,7 +60,7 @@ under the License.
|
|||
<group-address>231.7.7.7</group-address>
|
||||
<group-port>9876</group-port>
|
||||
<broadcast-period>5000</broadcast-period>
|
||||
<connector-ref>netty</connector-ref>
|
||||
<connector-ref>activemq</connector-ref>
|
||||
</broadcast-group>
|
||||
</broadcast-groups>
|
||||
|
||||
|
@ -66,7 +75,7 @@ under the License.
|
|||
<cluster-connections>
|
||||
<cluster-connection name="my-cluster">
|
||||
<address>jms</address>
|
||||
<connector-ref>netty</connector-ref>
|
||||
<connector-ref>activemq</connector-ref>
|
||||
<discovery-group-ref discovery-group-name="dg-group1"/>
|
||||
</cluster-connection>
|
||||
</cluster-connections>
|
||||
|
|
|
@ -18,11 +18,13 @@
|
|||
|
||||
<broker xmlns="http://activemq.org/schema">
|
||||
|
||||
<core configuration="file:${activemq.home}/config/clustered/activemq-configuration.xml"/>
|
||||
<basic-security>
|
||||
<users>file:${activemq.home}/config/non-clustered/activemq-users.properties</users>
|
||||
<roles>file:${activemq.home}/config/non-clustered/activemq-roles.properties</roles>
|
||||
<default-user>guest</default-user>
|
||||
</basic-security>
|
||||
|
||||
<jms configuration="file:${activemq.home}/config/clustered/activemq-jms.xml"/>
|
||||
|
||||
<file-security configuration="file:${activemq.home}/config/non-clustered/activemq-users.xml"/>
|
||||
<server configuration="file:${activemq.home}/config/clustered/activemq-configuration.xml"/>
|
||||
|
||||
<web bind="http://localhost:8161" path="web">
|
||||
<app url="jolokia" war="jolokia-war-1.2.3.war"/>
|
||||
|
|
|
@ -35,13 +35,22 @@ under the License.
|
|||
<large-messages-directory>${data.dir:../data}/large-messages</large-messages-directory>
|
||||
|
||||
<connectors>
|
||||
<connector name="netty">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.port:5445}</connector>
|
||||
<connector name="netty-throughput">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.batch.port:5455}?batchDelay=50</connector>
|
||||
<!-- Default Connector. Returned to clients during broadcast and distributed around cluster. See broadcast and discovery-groups -->
|
||||
<connector name="activemq">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.port:61616}</connector>
|
||||
</connectors>
|
||||
|
||||
<acceptors>
|
||||
<acceptor name="netty">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.port:5445}</acceptor>
|
||||
<acceptor name="netty-throughput">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.batch.port:5455}?batchDelay=50;directDeliver=false</acceptor>
|
||||
<!-- Default ActiveMQ Acceptor. Multi-protocol adapter. Currently supports Core, OpenWire, Stomp and AMQP -->
|
||||
<acceptor name="activemq">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.port:61616}</acceptor>
|
||||
|
||||
<!-- AMQP Connector. Listens on default AMQP port for AMQP traffic. -->
|
||||
<acceptor name="amqp">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.port:5672}?protocols=AMQP</acceptor>
|
||||
|
||||
<!-- STOMP Acceptor. Enables ActiveMQ Core protocol, OpenWire and STOMP. -->
|
||||
<acceptor name="stomp">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.port:61613}?protocols=STOMP</acceptor>
|
||||
|
||||
<!-- HornetQ Compatibility Acceptor. Enables ActiveMQ Core and STOMP for legacy HornetQ clients -->
|
||||
<acceptor name="hornetq">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.port:5445}?protocols=CORE,STOMP</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<security-settings>
|
||||
|
|
|
@ -42,13 +42,22 @@ under the License.
|
|||
<large-messages-directory>${data.dir:../data}/large-messages</large-messages-directory>
|
||||
|
||||
<connectors>
|
||||
<connector name="netty">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.port:5445}</connector>
|
||||
<connector name="netty-throughput">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.batch.port:5455}?batchDelay=50</connector>
|
||||
<!-- Default Connector. Returned to clients during broadcast. -->
|
||||
<connector name="activemq">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.port:61616}</connector>
|
||||
</connectors>
|
||||
|
||||
<acceptors>
|
||||
<acceptor name="netty">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.port:5445}</acceptor>
|
||||
<acceptor name="netty-throughput">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.batch.port:5455}?batchDelay=50;directDeliver=false</acceptor>
|
||||
<!-- Default ActiveMQ Acceptor. Multi-protocol adapter. Currently supports Core, OpenWire, Stomp and AMQP -->
|
||||
<acceptor name="activemq">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.port:61616}</acceptor>
|
||||
|
||||
<!-- AMQP Connector. Listens on default AMQP port for AMQP traffic. -->
|
||||
<acceptor name="amqp">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.port:5672}?protocols=AMQP</acceptor>
|
||||
|
||||
<!-- STOMP Acceptor. Enables ActiveMQ Core protocol, OpenWire and STOMP. -->
|
||||
<acceptor name="stomp">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.port:61613}?protocols=STOMP</acceptor>
|
||||
|
||||
<!-- HornetQ Compatibility Acceptor. Enables ActiveMQ Core and STOMP for legacy HornetQ clients -->
|
||||
<acceptor name="hornetq">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.port:5445}?protocols=CORE,STOMP</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<broadcast-groups>
|
||||
|
@ -56,7 +65,7 @@ under the License.
|
|||
<group-address>231.7.7.7</group-address>
|
||||
<group-port>9876</group-port>
|
||||
<broadcast-period>5000</broadcast-period>
|
||||
<connector-ref>netty</connector-ref>
|
||||
<connector-ref>activemq</connector-ref>
|
||||
</broadcast-group>
|
||||
</broadcast-groups>
|
||||
|
||||
|
@ -71,7 +80,7 @@ under the License.
|
|||
<cluster-connections>
|
||||
<cluster-connection name="my-cluster">
|
||||
<address>jms</address>
|
||||
<connector-ref>netty</connector-ref>
|
||||
<connector-ref>activemq</connector-ref>
|
||||
<discovery-group-ref discovery-group-name="dg-group1"/>
|
||||
</cluster-connection>
|
||||
</cluster-connections>
|
||||
|
|
|
@ -18,11 +18,13 @@
|
|||
|
||||
<broker xmlns="http://activemq.org/schema">
|
||||
|
||||
<core configuration="file:${activemq.home}/config/replicated/activemq-configuration.xml"/>
|
||||
<basic-security>
|
||||
<users>file:${activemq.home}/config/non-clustered/activemq-users.properties</users>
|
||||
<roles>file:${activemq.home}/config/non-clustered/activemq-roles.properties</roles>
|
||||
<default-user>guest</default-user>
|
||||
</basic-security>
|
||||
|
||||
<jms configuration="file:${activemq.home}/config/replicated/activemq-jms.xml"/>
|
||||
|
||||
<file-security configuration="file:${activemq.home}/config/non-clustered/activemq-users.xml"/>
|
||||
<server configuration="file:${activemq.home}/config/replicated/activemq-configuration.xml"/>
|
||||
|
||||
<web bind="http://localhost:8161" path="web">
|
||||
<app url="jolokia" war="jolokia-war-1.2.3.war"/>
|
||||
|
|
|
@ -42,13 +42,22 @@ under the License.
|
|||
<large-messages-directory>${data.dir:../data}/large-messages</large-messages-directory>
|
||||
|
||||
<connectors>
|
||||
<connector name="netty">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.port:5445}</connector>
|
||||
<connector name="netty-throughput">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.batch.port:5455}?batchDelay=50</connector>
|
||||
<!-- Default Connector. Returned to clients during broadcast and distributed around cluster. See broadcast and discovery-groups -->
|
||||
<connector name="activemq">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.port:61616}</connector>
|
||||
</connectors>
|
||||
|
||||
<acceptors>
|
||||
<acceptor name="netty">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.port:5445}</acceptor>
|
||||
<acceptor name="netty-throughput">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.batch.port:5455}?batchDelay=50;directDeliver=false</acceptor>
|
||||
<!-- Default ActiveMQ Acceptor. Multi-protocol adapter. Currently supports Core, OpenWire, Stomp and AMQP -->
|
||||
<acceptor name="activemq">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.port:61616}</acceptor>
|
||||
|
||||
<!-- AMQP Acceptor. Listens on default STOMP port for AMQP traffic. -->
|
||||
<acceptor name="amqp">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.port:5672}?protocols=AMQP</acceptor>
|
||||
|
||||
<!-- STOMP Acceptor. Enables ActiveMQ Core protocol, OpenWire and STOMP. -->
|
||||
<acceptor name="stomp">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.port:61613}?protocols=STOMP</acceptor>
|
||||
|
||||
<!-- HornetQ Compatibility Acceptor. Enables ActiveMQ Core and STOMP for legacy HornetQ clients -->
|
||||
<acceptor name="hornetq">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.port:5445}?protocols=CORE,STOMP</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<broadcast-groups>
|
||||
|
@ -56,7 +65,7 @@ under the License.
|
|||
<group-address>231.7.7.7</group-address>
|
||||
<group-port>9876</group-port>
|
||||
<broadcast-period>5000</broadcast-period>
|
||||
<connector-ref>netty</connector-ref>
|
||||
<connector-ref>activemq</connector-ref>
|
||||
</broadcast-group>
|
||||
</broadcast-groups>
|
||||
|
||||
|
@ -71,7 +80,7 @@ under the License.
|
|||
<cluster-connections>
|
||||
<cluster-connection name="my-cluster">
|
||||
<address>jms</address>
|
||||
<connector-ref>netty</connector-ref>
|
||||
<connector-ref>activemq</connector-ref>
|
||||
<discovery-group-ref discovery-group-name="dg-group1"/>
|
||||
</cluster-connection>
|
||||
</cluster-connections>
|
||||
|
|
|
@ -18,11 +18,13 @@
|
|||
|
||||
<broker xmlns="http://activemq.org/schema">
|
||||
|
||||
<core configuration="file:${activemq.home}/config/shared-store/activemq-configuration.xml"/>
|
||||
<basic-security>
|
||||
<users>file:${activemq.home}/config/non-clustered/activemq-users.properties</users>
|
||||
<roles>file:${activemq.home}/config/non-clustered/activemq-roles.properties</roles>
|
||||
<default-user>guest</default-user>
|
||||
</basic-security>
|
||||
|
||||
<jms configuration="file:${activemq.home}/config/shared-store/activemq-jms.xml"/>
|
||||
|
||||
<file-security configuration="file:${activemq.home}/config/non-clustered/activemq-users.xml"/>
|
||||
<server configuration="file:${activemq.home}/config/shared-store/activemq-configuration.xml"/>
|
||||
|
||||
<web bind="http://localhost:8161" path="web">
|
||||
<app url="jolokia" war="jolokia-war-1.2.3.war"/>
|
||||
|
|
|
@ -99,7 +99,7 @@ Type the command `mvn verify` and you should see the following output:
|
|||
Apr 17, 2013 10:51:02 AM org.apache.activemq.core.server.impl.ActiveMQServerImpl deployQueue
|
||||
INFO: HQ221003: trying to deploy queue jms.queue.exampleQueue
|
||||
Apr 17, 2013 10:51:02 AM org.apache.activemq.core.remoting.impl.netty.NettyAcceptor start
|
||||
INFO: HQ221020: Started Netty Acceptor version 3.6.2.Final-c0d783c localhost:5445 for CORE protocol
|
||||
INFO: HQ221020: Started Netty Acceptor version 3.6.2.Final-c0d783c localhost:61616 for CORE protocol
|
||||
Apr 17, 2013 10:51:02 AM org.apache.activemq.core.server.impl.ActiveMQServerImpl$SharedStoreLiveActivation run
|
||||
INFO: HQ221007: Server is now live
|
||||
Apr 17, 2013 10:51:02 AM org.apache.activemq.core.server.impl.ActiveMQServerImpl start
|
||||
|
@ -230,7 +230,7 @@ In the shell window you should see something like the following output:
|
|||
10:58:06,434 INFO [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on localhost.localdomain/127.0.0.1:4447
|
||||
10:58:06,434 INFO [org.jboss.as.remoting] (MSC service thread 1-15) JBAS017100: Listening on /127.0.0.1:9999
|
||||
10:58:06,436 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-16) JBAS015012: Started FileSystemDeploymentService for directory /home/andy/projects/activemq-master/examples/javaee/mdb-bmt/target/jbossas-node0/standalone/deployments
|
||||
10:58:08,790 INFO [org.apache.activemq.core.remoting.impl.netty.NettyAcceptor] (MSC service thread 1-11) Started Netty Acceptor version 3.2.5.Final-a96d88c localhost.localdomain:5445 for CORE protocol
|
||||
10:58:08,790 INFO [org.apache.activemq.core.remoting.impl.netty.NettyAcceptor] (MSC service thread 1-11) Started Netty Acceptor version 3.2.5.Final-a96d88c localhost.localdomain:61616 for CORE protocol
|
||||
10:58:08,793 INFO [org.apache.activemq.core.remoting.impl.netty.NettyAcceptor] (MSC service thread 1-11) Started Netty Acceptor version 3.2.5.Final-a96d88c localhost.localdomain:5455 for CORE protocol
|
||||
10:58:08,795 INFO [org.apache.activemq.core.server.impl.ActiveMQServerImpl] (MSC service thread 1-11) Server is now live
|
||||
10:58:08,797 INFO [org.apache.activemq.core.server.impl.ActiveMQServerImpl] (MSC service thread 1-11) ActiveMQ Server version 2.2.13.Final (HQ_2_2_13_FINAL_AS7, 122) [5c499e88-9c63-11e2-bfa3-fe5400591699]) started
|
||||
|
|
|
@ -87,8 +87,8 @@ standalone-full.xml configuration by running the command
|
|||
14:47:44,115 INFO [org.jboss.as.jacorb] (MSC service thread 1-13) JBAS016328: CORBA Naming Service started
|
||||
14:47:44,345 INFO [org.wildfly.extension.undertow] (MSC service thread 1-3) JBAS018210: Register web context: /activemq-server
|
||||
14:47:44,361 INFO [org.apache.activemq.core.server] (ServerService Thread Pool -- 58) HQ221020: Started Netty Acceptor version 3.6.6.Final-90e1eb2 127.0.0.1:5455 for CORE protocol
|
||||
14:47:44,362 INFO [org.apache.activemq.core.server] (ServerService Thread Pool -- 58) HQ221020: Started Netty Acceptor version 3.6.6.Final-90e1eb2 127.0.0.1:5445 for CORE protocol
|
||||
14:47:44,364 INFO [org.apache.activemq.core.server] (ServerService Thread Pool -- 58) HQ221020: Started Netty Acceptor version 3.6.6.Final-90e1eb2 org.apache.activemq.default.servlet:5445 for CORE protocol
|
||||
14:47:44,362 INFO [org.apache.activemq.core.server] (ServerService Thread Pool -- 58) HQ221020: Started Netty Acceptor version 3.6.6.Final-90e1eb2 127.0.0.1:61616 for CORE protocol
|
||||
14:47:44,364 INFO [org.apache.activemq.core.server] (ServerService Thread Pool -- 58) HQ221020: Started Netty Acceptor version 3.6.6.Final-90e1eb2 org.apache.activemq.default.servlet:61616 for CORE protocol
|
||||
14:47:44,366 INFO [org.apache.activemq.core.server] (ServerService Thread Pool -- 58) HQ221007: Server is now live
|
||||
14:47:44,366 INFO [org.apache.activemq.core.server] (ServerService Thread Pool -- 58) HQ221001: ActiveMQ Server version 2.4.0.Beta2 (Andromedian Flyer, 123) [bcc1cd10-2bfb-11e3-ad5f-9f88840f9e1a]
|
||||
14:47:44,435 INFO [org.jboss.as.messaging] (ServerService Thread Pool -- 58) JBAS011601: Bound messaging object to jndi name java:/ConnectionFactory
|
||||
|
|
|
@ -115,7 +115,7 @@ JMS connection factory instances then you can specify these parameters
|
|||
in the JNDI context environment in, e.g. `jndi.properties`:
|
||||
|
||||
java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
|
||||
java.naming.provider.url = tcp://localhost:5445
|
||||
java.naming.provider.url = tcp://localhost:61616
|
||||
connection.ConnectionFactory.retryInterval=1000
|
||||
connection.ConnectionFactory.retryIntervalMultiplier=1.5
|
||||
connection.ConnectionFactory.maxRetryInterval=60000
|
||||
|
|
|
@ -469,7 +469,7 @@ JMS connection factory instances then you can specify these parameters
|
|||
in the JNDI context environment in, e.g. `jndi.properties`:
|
||||
|
||||
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
|
||||
java.naming.provider.url=tcp://myhost:5445,myhost2:5445
|
||||
java.naming.provider.url=tcp://myhost:61616,myhost2:61616
|
||||
|
||||
The `java.naming.provider.url` contains a list of servers to use for the
|
||||
connection factory. When this connection factory used client application
|
||||
|
@ -485,11 +485,11 @@ connection factory. Here's an example:
|
|||
``` java
|
||||
HashMap<String, Object> map = new HashMap<String, Object>();
|
||||
map.put("host", "myhost");
|
||||
map.put("port", "5445");
|
||||
map.put("port", "61616");
|
||||
TransportConfiguration server1 = new TransportConfiguration(NettyConnectorFactory.class.getName(), map);
|
||||
HashMap<String, Object> map2 = new HashMap<String, Object>();
|
||||
map2.put("host", "myhost2");
|
||||
map2.put("port", "5446");
|
||||
map2.put("port", "61617");
|
||||
TransportConfiguration server2 = new TransportConfiguration(NettyConnectorFactory.class.getName(), map2);
|
||||
|
||||
ActiveMQConnectionFactory cf = ActiveMQJMSClient.createConnectionFactoryWithHA(JMSFactoryType.CF, server1, server2);
|
||||
|
@ -502,11 +502,11 @@ If you are using the core API then the same can be done as follows:
|
|||
``` java
|
||||
HashMap<String, Object> map = new HashMap<String, Object>();
|
||||
map.put("host", "myhost");
|
||||
map.put("port", "5445");
|
||||
map.put("port", "61616");
|
||||
TransportConfiguration server1 = new TransportConfiguration(NettyConnectorFactory.class.getName(), map);
|
||||
HashMap<String, Object> map2 = new HashMap<String, Object>();
|
||||
map2.put("host", "myhost2");
|
||||
map2.put("port", "5446");
|
||||
map2.put("port", "61617");
|
||||
TransportConfiguration server2 = new TransportConfiguration(NettyConnectorFactory.class.getName(), map2);
|
||||
|
||||
ServerLocator locator = ActiveMQClient.createServerLocatorWithHA(server1, server2);
|
||||
|
@ -846,7 +846,7 @@ in the JNDI context environment in, e.g. `jndi.properties`, to specify
|
|||
the load balancing policy directly:
|
||||
|
||||
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
|
||||
java.naming.provider.url=tcp://localhost:5445
|
||||
java.naming.provider.url=tcp://localhost:61616
|
||||
connection.ConnectionFactory.loadBalancingPolicyClassName=org.apache.activemq.api.core.client.loadbalance.RandomConnectionLoadBalancingPolicy
|
||||
|
||||
The above example would instantiate a JMS connection factory that uses
|
||||
|
|
|
@ -14,7 +14,7 @@ One of the most important concepts in ActiveMQ transports is the
|
|||
defined in xml in the configuration file `activemq-configuration.xml`.
|
||||
|
||||
<acceptors>
|
||||
<acceptor name="netty">tcp://localhost:5446</acceptor>
|
||||
<acceptor name="netty">tcp://localhost:61617</acceptor>
|
||||
</acceptors>
|
||||
|
||||
Acceptors are always defined inside an `acceptors` element. There can be
|
||||
|
@ -26,7 +26,7 @@ ActiveMQ server.
|
|||
|
||||
In the above example we're defining an acceptor that uses
|
||||
[Netty](http://netty.io/) to listen for connections at port
|
||||
`5446`.
|
||||
`61617`.
|
||||
|
||||
The `acceptor` element contains a `URI` that defines the kind of Acceptor
|
||||
to create along with its configuration. The `schema` part of the `URI`
|
||||
|
@ -41,7 +41,7 @@ valid key-value pairs depends on the specific transport be used and are
|
|||
passed straight through to the underlying transport. These are set on the
|
||||
`URI` as part of the query, like so:
|
||||
|
||||
<acceptor name="netty">tcp://localhost:5446?sslEnabled=true;key-store-path=/path</acceptor>
|
||||
<acceptor name="netty">tcp://localhost:61617?sslEnabled=true;key-store-path=/path</acceptor>
|
||||
|
||||
## Understanding Connectors
|
||||
|
||||
|
@ -53,7 +53,7 @@ Let's look at a connector defined in our `activemq-configuration.xml`
|
|||
file:
|
||||
|
||||
<connectors>
|
||||
<connector name="netty">tcp://localhost:5446</connector>
|
||||
<connector name="netty">tcp://localhost:61617</connector>
|
||||
</connectors>
|
||||
|
||||
Connectors can be defined inside a `connectors` element. There can be
|
||||
|
@ -82,7 +82,7 @@ couple of reasons for this:
|
|||
simple example:
|
||||
|
||||
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
|
||||
connectionFactory.MyConnectionFactory=tcp://myhost:5445
|
||||
connectionFactory.MyConnectionFactory=tcp://myhost:61616
|
||||
|
||||
## Configuring the transport directly from the client side.
|
||||
|
||||
|
@ -98,13 +98,13 @@ configuration, instead we just create the parameters and tell the
|
|||
Here's an example of creating a `ClientSessionFactory` which will
|
||||
connect directly to the acceptor we defined earlier in this chapter, it
|
||||
uses the standard Netty TCP transport and will try and connect on port
|
||||
5446 to localhost (default):
|
||||
61617 to localhost (default):
|
||||
|
||||
``` java
|
||||
Map<String, Object> connectionParams = new HashMap<String, Object>();
|
||||
|
||||
connectionParams.put(org.apache.activemq.core.remoting.impl.netty.TransportConstants.PORT_PROP_NAME,
|
||||
5446);
|
||||
61617);
|
||||
|
||||
TransportConfiguration transportConfiguration =
|
||||
new TransportConfiguration(
|
||||
|
@ -127,7 +127,7 @@ on the server side or define a connection factory in `activemq-jms.xml`:
|
|||
``` java
|
||||
Map<String, Object> connectionParams = new HashMap<String, Object>();
|
||||
|
||||
connectionParams.put(org.apache.activemq.core.remoting.impl.netty.TransportConstants.PORT_PROP_NAME, 5446);
|
||||
connectionParams.put(org.apache.activemq.core.remoting.impl.netty.TransportConstants.PORT_PROP_NAME, 61617);
|
||||
|
||||
TransportConfiguration transportConfiguration =
|
||||
new TransportConfiguration(
|
||||
|
@ -164,7 +164,7 @@ Sockets are being used and also use the appropriate decoders
|
|||
It is possible to limit which protocols are supported by using the
|
||||
`protocols` parameter on the Acceptor like so:
|
||||
|
||||
<connector name="netty">tcp://localhost:5446?protocols=CORE,AMQP</connector>
|
||||
<connector name="netty">tcp://localhost:61617?protocols=CORE,AMQP</connector>
|
||||
|
||||
|
||||
> **Note**
|
||||
|
@ -232,7 +232,7 @@ Netty for simple TCP:
|
|||
|
||||
- `port`. This specified the port to connect to (when configuring a
|
||||
connector) or to listen on (when configuring an acceptor). The
|
||||
default value for this property is `5445`.
|
||||
default value for this property is `61616`.
|
||||
|
||||
- `tcpNoDelay`. If this is `true` then [Nagle's
|
||||
algorithm](http://en.wikipedia.org/wiki/Nagle%27s_algorithm) will be
|
||||
|
|
|
@ -102,7 +102,7 @@ environment, e.g. `jndi.properties`. Here's a simple example using the
|
|||
by default:
|
||||
|
||||
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
|
||||
java.naming.provider.url=tcp://localhost:5445
|
||||
java.naming.provider.url=tcp://localhost:61616
|
||||
connection.ConnectionFactory.consumerWindowSize=0
|
||||
|
||||
If the connection factory is directly instantiated, the consumer window
|
||||
|
@ -140,7 +140,7 @@ max rate can be configured in the JNDI context environment, e.g.
|
|||
connection factory which is available in the context by default:
|
||||
|
||||
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
|
||||
java.naming.provider.url=tcp://localhost:5445
|
||||
java.naming.provider.url=tcp://localhost:61616
|
||||
connection.ConnectionFactory.consumerMaxRate=10
|
||||
|
||||
If the connection factory is directly instantiated, the max rate size
|
||||
|
@ -194,7 +194,7 @@ e.g. `jndi.properties`. Here's a simple example using the
|
|||
by default:
|
||||
|
||||
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
|
||||
java.naming.provider.url=tcp://localhost:5445
|
||||
java.naming.provider.url=tcp://localhost:61616
|
||||
connection.ConnectionFactory.producerWindowSize=10
|
||||
|
||||
If the connection factory is directly instantiated, the producer window
|
||||
|
@ -289,7 +289,7 @@ max rate size can be configured in the JNDI context environment, e.g.
|
|||
connection factory which is available in the context by default:
|
||||
|
||||
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
|
||||
java.naming.provider.url=tcp://localhost:5445
|
||||
java.naming.provider.url=tcp://localhost:61616
|
||||
connection.ConnectionFactory.producerMaxRate=10
|
||||
|
||||
If the connection factory is directly instantiated, the max rate size
|
||||
|
|
|
@ -594,7 +594,7 @@ replication as in the previous chapter. `shared-store` is also supported
|
|||
If the HA Policy is colocated then connectors and acceptors will be
|
||||
inherited from the live server creating it and offset depending on the
|
||||
setting of `backup-port-offset` configuration element. If this is set to
|
||||
say 100 (which is the default) and a connector is using port 5445 then
|
||||
say 100 (which is the default) and a connector is using port 61616 then
|
||||
this will be set to 5545 for the first server created, 5645 for the
|
||||
second and so on.
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ environment, e.g. `jndi.properties`. Here's a simple example using the
|
|||
by default:
|
||||
|
||||
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
|
||||
java.naming.provider.url=tcp://localhost:5445
|
||||
java.naming.provider.url=tcp://localhost:61616
|
||||
connection.ConnectionFactory.minLargeMessageSize=250000
|
||||
|
||||
|
||||
|
@ -122,7 +122,7 @@ e.g. `jndi.properties`. Here's a simple example using the
|
|||
by default:
|
||||
|
||||
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
|
||||
java.naming.provider.url=tcp://localhost:5445
|
||||
java.naming.provider.url=tcp://localhost:61616
|
||||
connection.ConnectionFactory.compressLargeMessages=true
|
||||
|
||||
## Streaming large messages
|
||||
|
|
|
@ -68,7 +68,7 @@ Here's a simple example using the "ConnectionFactory" connection factory
|
|||
which is available in the context by default
|
||||
|
||||
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
|
||||
java.naming.provider.url=tcp://localhost:5445
|
||||
java.naming.provider.url=tcp://localhost:61616
|
||||
connection.ConnectionFactory.autoGroup=true
|
||||
|
||||
Alternatively you can set the group id via the connection factory. All
|
||||
|
@ -79,7 +79,7 @@ Here's a simple example using the "ConnectionFactory" connection factory
|
|||
which is available in the context by default:
|
||||
|
||||
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
|
||||
java.naming.provider.url=tcp://localhost:5445
|
||||
java.naming.provider.url=tcp://localhost:61616
|
||||
connection.ConnectionFactory.groupID=Group-0
|
||||
|
||||
## Example
|
||||
|
|
|
@ -46,7 +46,7 @@ This can be configured in a client's JNDI context environment, e.g.
|
|||
`jndi.properties`, like this:
|
||||
|
||||
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
|
||||
java.naming.provider.url=tcp://localhost:5445
|
||||
java.naming.provider.url=tcp://localhost:61616
|
||||
connection.ConnectionFactory.preAcknowledge=true
|
||||
|
||||
Alternatively, to use pre-acknowledgement mode using the JMS API, create
|
||||
|
|
|
@ -150,7 +150,7 @@ by default:
|
|||
|
||||
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
|
||||
|
||||
java.naming.provider.url=tcp://localhost:5445
|
||||
java.naming.provider.url=tcp://localhost:61616
|
||||
|
||||
connection.ConnectionFactory.useGlobalPools=false
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ by eliminating the need so specify a classpath. These tools are:
|
|||
|
||||
Here's an example:
|
||||
|
||||
java -jar activemq-tools-<version>-jar-with-dependencies.jar import /home/user/exportData.xml 127.0.0.1 5445 false false
|
||||
java -jar activemq-tools-<version>-jar-with-dependencies.jar import /home/user/exportData.xml 127.0.0.1 61616 false false
|
||||
|
||||
Like the `export` tool the `import` tool is single threaded so
|
||||
depending on the size of the XML file it may take awhile for the
|
||||
|
|
|
@ -99,15 +99,15 @@ Here is a list of all the supported URL schemes:
|
|||
Most clients won't be connecting to an embedded broker. Clients will
|
||||
most commonly connect across a network a remote broker. Here's a simple
|
||||
example of a client configuring a connection factory to connect to a
|
||||
remote broker running on myhost:5445:
|
||||
remote broker running on myhost:61616:
|
||||
|
||||
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
|
||||
connectionFactory.ConnectionFactory=tcp://myhost:5445
|
||||
connectionFactory.ConnectionFactory=tcp://myhost:61616
|
||||
|
||||
In the example above the client is using the `tcp` scheme for the
|
||||
provider URL. A client may also specify multiple comma-delimited
|
||||
host:port combinations in the URL (e.g.
|
||||
`(tcp://remote-host1:5445,remote-host2:5445)`). Whether there is one or
|
||||
`(tcp://remote-host1:61616,remote-host2:61616)`). Whether there is one or
|
||||
many host:port combinations in the URL they are treated as the *initial
|
||||
connector(s)* for the underlying connection.
|
||||
|
||||
|
@ -120,7 +120,7 @@ traditional URL query string format (e.g.
|
|||
`scheme://host:port?key1=value1&key2=value2`) to customize the
|
||||
underlying transport mechanism. For example, if a client wanted to
|
||||
connect to a remote server using TCP and SSL it would create a connection
|
||||
factory like so, `tcp://remote-host:5445?ssl-enabled=true`.
|
||||
factory like so, `tcp://remote-host:61616?ssl-enabled=true`.
|
||||
|
||||
All the properties available for the `tcp` scheme are described in [the
|
||||
documentation regarding the Netty
|
||||
|
@ -130,7 +130,7 @@ Note if you are using the `tcp` scheme and multiple addresses then a query
|
|||
can be applied to all the url's or just to an individual connector, so where
|
||||
you have
|
||||
|
||||
- `(tcp://remote-host1:5445?httpEnabled=true,remote-host2:5445?httpEnabled=true)?clientID=1234`
|
||||
- `(tcp://remote-host1:61616?httpEnabled=true,remote-host2:61616?httpEnabled=true)?clientID=1234`
|
||||
|
||||
then the `httpEnabled` property is only set on the individual connectors where as the `clientId`
|
||||
is set on the actual connection factory. Any connector specific properties set on the whole
|
||||
|
@ -181,7 +181,7 @@ The default type for the default connection factory is of type `javax.jms.Connec
|
|||
This can be changed by setting the type like so
|
||||
|
||||
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
|
||||
java.naming.provider.url=tcp://localhost:5445?type=CF
|
||||
java.naming.provider.url=tcp://localhost:61616?type=CF
|
||||
|
||||
In this example it is still set to the default, below shows a list of types that can be set.
|
||||
|
||||
|
@ -233,7 +233,7 @@ And if the client wanted to bind this queue to "queues/OrderQueue" then
|
|||
the JNDI properties would be configured like so:
|
||||
|
||||
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
|
||||
java.naming.provider.url=tcp://myhost:5445
|
||||
java.naming.provider.url=tcp://myhost:61616
|
||||
queue.queues/OrderQueue=OrderQueue
|
||||
|
||||
It is also possible to look-up JMS destinations which haven't been
|
||||
|
@ -256,7 +256,7 @@ initialized using those properties:
|
|||
InitialContext ic = new InitialContext();
|
||||
|
||||
//Now we'll look up the connection factory from which we can create
|
||||
//connections to myhost:5445:
|
||||
//connections to myhost:61616:
|
||||
|
||||
ConnectionFactory cf = (ConnectionFactory)ic.lookup("ConnectionFactory");
|
||||
|
||||
|
|
|
@ -97,12 +97,12 @@ It is also possible to use system property substitution in all the
|
|||
configuration files. by replacing a value with the name of a system
|
||||
property. Here is an example of this with a connector configuration:
|
||||
|
||||
<connector name="netty">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.port:5445}</connector>
|
||||
<connector name="netty">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.port:61616}</connector>
|
||||
|
||||
Here you can see we have replaced 2 values with system properties
|
||||
`activemq.remoting.netty.host` and `activemq.remoting.netty.port`. These
|
||||
values will be replaced by the value found in the system property if
|
||||
there is one, if not they default back to localhost or 5445
|
||||
there is one, if not they default back to localhost or 61616
|
||||
respectively. It is also possible to not supply a default. i.e.
|
||||
`${activemq.remoting.netty.host}`, however the system property *must* be
|
||||
supplied in that case.
|
||||
|
|
|
@ -54,7 +54,7 @@ public class EmbeddedRemoteExample
|
|||
*/
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
map.put("host", "localhost");
|
||||
map.put("port", 5445);
|
||||
map.put("port", 61616);
|
||||
// -------------------------------------------------------
|
||||
|
||||
ServerLocator serverLocator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName(), map));
|
||||
|
|
|
@ -51,7 +51,7 @@ public class EmbeddedServer
|
|||
*/
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
map.put("host", "localhost");
|
||||
map.put("port", 5445);
|
||||
map.put("port", 61616);
|
||||
|
||||
TransportConfiguration transpConf = new TransportConfiguration(NettyAcceptorFactory.class.getName(),map);
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ throttle-rate=-1
|
|||
address=perfAddress
|
||||
queue-name=perfQueue
|
||||
host=localhost
|
||||
port=5445
|
||||
port=61616
|
||||
tcp-buffer=2048576
|
||||
tcp-no-delay=false
|
||||
confirmation-window=1048576
|
||||
|
|
|
@ -31,7 +31,7 @@ under the License.
|
|||
<paging-directory>target/server0/data/messaging/paging</paging-directory>
|
||||
<!-- Acceptors -->
|
||||
<acceptors>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:5445?tcpNoDelay=false;tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576</acceptor>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:61616?tcpNoDelay=false;tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<security-enabled>false</security-enabled>
|
||||
|
|
|
@ -31,7 +31,7 @@ under the License.
|
|||
<paging-directory>${build.directory}/server0/data/messaging/paging</paging-directory>
|
||||
<!-- Acceptors -->
|
||||
<acceptors>
|
||||
<acceptor name="netty-acceptor">tcp://172.16.8.10:5445?tcpNoDelay=false;tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576</acceptor>
|
||||
<acceptor name="netty-acceptor">tcp://172.16.8.10:61616?tcpNoDelay=false;tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<security-enabled>false</security-enabled>
|
||||
|
|
|
@ -36,12 +36,12 @@ under the License.
|
|||
<!-- Connectors -->
|
||||
|
||||
<connectors>
|
||||
<connector name="netty-connector">tcp://localhost:5445</connector>
|
||||
<connector name="netty-connector">tcp://localhost:61616</connector>
|
||||
</connectors>
|
||||
|
||||
<!-- Acceptors -->
|
||||
<acceptors>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:5445</acceptor>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<!-- Other config -->
|
||||
|
|
|
@ -159,7 +159,7 @@ public abstract class ActiveMQExample
|
|||
{
|
||||
HashMap<String, Object> params = new HashMap<String, Object>();
|
||||
params.put("host", "localhost");
|
||||
params.put("port", 5445 + id);
|
||||
params.put("port", 61616 + id);
|
||||
TransportConfiguration transportConfiguration = new TransportConfiguration(NettyConnectorFactory.class.getName(), params);
|
||||
ActiveMQConnectionFactory cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, transportConfiguration);
|
||||
cf.createConnection().close();
|
||||
|
@ -180,7 +180,7 @@ public abstract class ActiveMQExample
|
|||
ClientSession session = ((ActiveMQConnection) connection).getInitialSession();
|
||||
TransportConfiguration transportConfiguration = session.getSessionFactory().getConnectorConfiguration();
|
||||
String port = (String) transportConfiguration.getParams().get("port");
|
||||
return Integer.valueOf(port) - 5445;
|
||||
return Integer.valueOf(port) - 61616;
|
||||
}
|
||||
|
||||
protected Connection getServerConnection(int server, Connection... connections)
|
||||
|
@ -190,7 +190,7 @@ public abstract class ActiveMQExample
|
|||
ClientSession session = ((ActiveMQConnection) connection).getInitialSession();
|
||||
TransportConfiguration transportConfiguration = session.getSessionFactory().getConnectorConfiguration();
|
||||
String port = (String) transportConfiguration.getParams().get("port");
|
||||
if(Integer.valueOf(port) == server + 5445)
|
||||
if(Integer.valueOf(port) == server + 61616)
|
||||
{
|
||||
return connection;
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
</config-property>
|
||||
<config-property>
|
||||
<description>The transport configuration. These values must be in the form of key=val;key=val;,
|
||||
if multiple connectors are used then each set must be separated by a comma i.e. host=host1;port=5445,host=host2;port=5446.
|
||||
if multiple connectors are used then each set must be separated by a comma i.e. host=host1;port=61616,host=host2;port=61617.
|
||||
Each set of params maps to the connector classname specified.
|
||||
</description>
|
||||
<config-property-name>ConnectionParameters</config-property-name>
|
||||
|
|
|
@ -90,7 +90,7 @@ under the License.
|
|||
<configuration>
|
||||
<clientClass>org.apache.activemq.jms.example.AerogearExample</clientClass>
|
||||
<args>
|
||||
<param>tcp://localhost:5445</param>
|
||||
<param>tcp://localhost:61616</param>
|
||||
</args>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
|
|
@ -39,7 +39,7 @@ under the License.
|
|||
|
||||
<!-- Acceptors -->
|
||||
<acceptors>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:5445</acceptor>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<!-- We need to create a core queue for the JMS queue explicitly because the connector will be deployed
|
||||
|
|
|
@ -16,5 +16,5 @@
|
|||
# under the License.
|
||||
|
||||
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
|
||||
connectionFactory.ConnectionFactory=tcp://localhost:5445
|
||||
connectionFactory.ConnectionFactory=tcp://localhost:61616
|
||||
queue.queue/exampleQueue=exampleQueue
|
||||
|
|
|
@ -71,7 +71,7 @@ under the License.
|
|||
<configuration>
|
||||
<clientClass>org.apache.activemq.jms.example.AppletExample</clientClass>
|
||||
<args>
|
||||
<param>tcp://localhost:5445</param>
|
||||
<param>tcp://localhost:61616</param>
|
||||
</args>
|
||||
<systemProperties>
|
||||
<property>
|
||||
|
|
|
@ -39,7 +39,7 @@ under the License.
|
|||
|
||||
<!-- Acceptors -->
|
||||
<acceptors>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:5445</acceptor>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<!-- Other config -->
|
||||
|
|
|
@ -78,8 +78,8 @@ under the License.
|
|||
<configuration>
|
||||
<clientClass>org.apache.activemq.jms.example.ApplicationLayerFailoverExample</clientClass>
|
||||
<args>
|
||||
<param>tcp://localhost:5445</param>
|
||||
<param>tcp://localhost:5446</param>
|
||||
<param>tcp://localhost:61616</param>
|
||||
<param>tcp://localhost:61617</param>
|
||||
</args>
|
||||
<systemProperties>
|
||||
<property>
|
||||
|
|
|
@ -154,7 +154,7 @@ public class ApplicationLayerFailoverExample extends ActiveMQExample
|
|||
// Step 1. Get an initial context for looking up JNDI from the server
|
||||
Hashtable<String, Object> properties = new Hashtable<String, Object>();
|
||||
properties.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
|
||||
properties.put("connectionFactory.ConnectionFactory", "tcp://127.0.0.1:" + (5445 + server));
|
||||
properties.put("connectionFactory.ConnectionFactory", "tcp://127.0.0.1:" + (61616 + server));
|
||||
properties.put("queue.queue/exampleQueue", "exampleQueue");
|
||||
initialContext = new InitialContext(properties);
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ under the License.
|
|||
|
||||
<!-- Acceptors -->
|
||||
<acceptors>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:5445</acceptor>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<!-- Other config -->
|
||||
|
|
|
@ -32,7 +32,7 @@ under the License.
|
|||
|
||||
<!-- Acceptors -->
|
||||
<acceptors>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:5446</acceptor>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:61617</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<!-- Other config -->
|
||||
|
|
|
@ -82,8 +82,8 @@ under the License.
|
|||
<configuration>
|
||||
<clientClass>org.apache.activemq.jms.example.BridgeExample</clientClass>
|
||||
<args>
|
||||
<param>tcp://localhost:5445</param>
|
||||
<param>tcp://localhost:5446</param>
|
||||
<param>tcp://localhost:61616</param>
|
||||
<param>tcp://localhost:61617</param>
|
||||
</args>
|
||||
<systemProperties>
|
||||
<property>
|
||||
|
|
|
@ -59,7 +59,7 @@ public class BridgeExample extends ActiveMQExample
|
|||
|
||||
Hashtable<String, Object> properties = new Hashtable<String, Object>();
|
||||
properties.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
|
||||
properties.put("connectionFactory.ConnectionFactory", "tcp://127.0.0.1:5445");
|
||||
properties.put("connectionFactory.ConnectionFactory", "tcp://127.0.0.1:61616");
|
||||
properties.put("queue.queue/sausage-factory", "sausage-factory");
|
||||
ic0 = new InitialContext(properties);
|
||||
|
||||
|
@ -75,7 +75,7 @@ public class BridgeExample extends ActiveMQExample
|
|||
|
||||
properties = new Hashtable<String, Object>();
|
||||
properties.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
|
||||
properties.put("connectionFactory.ConnectionFactory", "tcp://127.0.0.1:5446");
|
||||
properties.put("connectionFactory.ConnectionFactory", "tcp://127.0.0.1:61617");
|
||||
properties.put("queue.queue/mincing-machine", "mincing-machine");
|
||||
ic1 = new InitialContext(properties);
|
||||
|
||||
|
|
|
@ -39,12 +39,12 @@ under the License.
|
|||
<!-- Connectors -->
|
||||
<connectors>
|
||||
<!-- Connector to the other node -->
|
||||
<connector name="remote-connector">tcp://localhost:5446</connector>
|
||||
<connector name="remote-connector">tcp://localhost:61617</connector>
|
||||
</connectors>
|
||||
|
||||
<!-- Acceptors -->
|
||||
<acceptors>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:5445</acceptor>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<!-- We need to create a core queue for the JMS queue explicitly because the bridge will be deployed
|
||||
|
|
|
@ -38,7 +38,7 @@ under the License.
|
|||
|
||||
<!-- Acceptors -->
|
||||
<acceptors>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:5446</acceptor>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:61617</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<!-- Other config -->
|
||||
|
|
|
@ -64,7 +64,7 @@ under the License.
|
|||
<configuration>
|
||||
<clientClass>org.apache.activemq.jms.example.QueueBrowserExample</clientClass>
|
||||
<args>
|
||||
<param>tcp://localhost:5445</param>
|
||||
<param>tcp://localhost:61616</param>
|
||||
</args>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
|
|
@ -39,7 +39,7 @@ under the License.
|
|||
|
||||
<!-- Acceptors -->
|
||||
<acceptors>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:5445</acceptor>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<!-- Other config -->
|
||||
|
|
|
@ -16,5 +16,5 @@
|
|||
# under the License.
|
||||
|
||||
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
|
||||
connectionFactory.ConnectionFactory=tcp://localhost:5445
|
||||
connectionFactory.ConnectionFactory=tcp://localhost:61616
|
||||
queue.queue/exampleQueue=exampleQueue
|
||||
|
|
|
@ -95,7 +95,7 @@ under the License.
|
|||
<configuration>
|
||||
<clientClass>org.apache.activemq.jms.example.ClientKickoffExample</clientClass>
|
||||
<args>
|
||||
<param>tcp://localhost:5445</param>
|
||||
<param>tcp://localhost:61616</param>
|
||||
</args>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
|
|
@ -40,7 +40,7 @@ under the License.
|
|||
|
||||
<!-- Acceptors -->
|
||||
<acceptors>
|
||||
<acceptor name="netty">tcp://localhost:5445</acceptor>
|
||||
<acceptor name="netty">tcp://localhost:61616</acceptor>
|
||||
</acceptors>
|
||||
</core>
|
||||
|
||||
|
|
|
@ -16,4 +16,4 @@
|
|||
# under the License.
|
||||
|
||||
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
|
||||
connectionFactory.ConnectionFactory=tcp://localhost:5445
|
||||
connectionFactory.ConnectionFactory=tcp://localhost:61616
|
||||
|
|
|
@ -44,12 +44,12 @@ under the License.
|
|||
|
||||
<!-- Connectors -->
|
||||
<connectors>
|
||||
<connector name="netty-connector">tcp://localhost:5445</connector>
|
||||
<connector name="netty-connector">tcp://localhost:61616</connector>
|
||||
</connectors>
|
||||
|
||||
<!-- Acceptors -->
|
||||
<acceptors>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:5445</acceptor>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<broadcast-groups>
|
||||
|
|
|
@ -45,12 +45,12 @@ under the License.
|
|||
|
||||
<!-- Connectors -->
|
||||
<connectors>
|
||||
<connector name="netty-connector">tcp://localhost:5446</connector>
|
||||
<connector name="netty-connector">tcp://localhost:61617</connector>
|
||||
</connectors>
|
||||
|
||||
<!-- Acceptors -->
|
||||
<acceptors>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:5446</acceptor>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:61617</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<broadcast-groups>
|
||||
|
|
|
@ -16,5 +16,5 @@
|
|||
# under the License.
|
||||
|
||||
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
|
||||
connectionFactory.ConnectionFactory=tcp://localhost:5445?ha=true&retryInterval=1000&retryIntervalMultiplier=1.0&reconnectAttempts=-1
|
||||
connectionFactory.ConnectionFactory=tcp://localhost:61616?ha=true&retryInterval=1000&retryIntervalMultiplier=1.0&reconnectAttempts=-1
|
||||
queue.queue/exampleQueue=exampleQueue
|
||||
|
|
|
@ -38,12 +38,12 @@ under the License.
|
|||
<!-- Connectors -->
|
||||
|
||||
<connectors>
|
||||
<connector name="netty-connector">tcp://localhost:5445</connector>
|
||||
<connector name="netty-connector">tcp://localhost:61616</connector>
|
||||
</connectors>
|
||||
|
||||
<!-- Acceptors -->
|
||||
<acceptors>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:5445</acceptor>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<!-- Clustering configuration -->
|
||||
|
|
|
@ -36,12 +36,12 @@ under the License.
|
|||
|
||||
<!-- Connectors -->
|
||||
<connectors>
|
||||
<connector name="netty-connector">tcp://localhost:5446</connector>
|
||||
<connector name="netty-connector">tcp://localhost:61617</connector>
|
||||
</connectors>
|
||||
|
||||
<!-- Acceptors -->
|
||||
<acceptors>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:5446</acceptor>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:61617</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<!-- Clustering configuration -->
|
||||
|
|
|
@ -34,12 +34,12 @@ under the License.
|
|||
|
||||
<!-- Connectors -->
|
||||
<connectors>
|
||||
<connector name="netty-connector">tcp://localhost:5447</connector>
|
||||
<connector name="netty-connector">tcp://localhost:61618</connector>
|
||||
</connectors>
|
||||
|
||||
<!-- Acceptors -->
|
||||
<acceptors>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:5447</acceptor>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:61618</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<!-- Clustering configuration -->
|
||||
|
|
|
@ -89,8 +89,8 @@ under the License.
|
|||
<configuration>
|
||||
<clientClass>org.apache.activemq.jms.example.ClusteredDurableSubscriptionExample</clientClass>
|
||||
<args>
|
||||
<param>tcp://localhost:5445</param>
|
||||
<param>tcp://localhost:5446</param>
|
||||
<param>tcp://localhost:61616</param>
|
||||
<param>tcp://localhost:61617</param>
|
||||
</args>
|
||||
<systemProperties>
|
||||
<property>
|
||||
|
|
|
@ -40,12 +40,12 @@ under the License.
|
|||
|
||||
<!-- Connectors -->
|
||||
<connectors>
|
||||
<connector name="netty-connector">tcp://localhost:5445</connector>
|
||||
<connector name="netty-connector">tcp://localhost:61616</connector>
|
||||
</connectors>
|
||||
|
||||
<!-- Acceptors -->
|
||||
<acceptors>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:5445</acceptor>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<!-- Clustering configuration -->
|
||||
|
|
|
@ -40,12 +40,12 @@ under the License.
|
|||
|
||||
<!-- Connectors -->
|
||||
<connectors>
|
||||
<connector name="netty-connector">tcp://localhost:5446</connector>
|
||||
<connector name="netty-connector">tcp://localhost:61617</connector>
|
||||
</connectors>
|
||||
|
||||
<!-- Acceptors -->
|
||||
<acceptors>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:5446</acceptor>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:61617</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<!-- Clustering configuration -->
|
||||
|
|
|
@ -117,9 +117,9 @@ under the License.
|
|||
<configuration>
|
||||
<clientClass>org.apache.activemq.jms.example.ClusteredGroupingExample</clientClass>
|
||||
<args>
|
||||
<param>tcp://localhost:5445</param>
|
||||
<param>tcp://localhost:5446</param>
|
||||
<param>tcp://localhost:5447</param>
|
||||
<param>tcp://localhost:61616</param>
|
||||
<param>tcp://localhost:61617</param>
|
||||
<param>tcp://localhost:61618</param>
|
||||
</args>
|
||||
<systemProperties>
|
||||
<property>
|
||||
|
|
|
@ -41,12 +41,12 @@ under the License.
|
|||
<!-- Connectors -->
|
||||
|
||||
<connectors>
|
||||
<connector name="netty-connector">tcp://localhost:5445</connector>
|
||||
<connector name="netty-connector">tcp://localhost:61616</connector>
|
||||
</connectors>
|
||||
|
||||
<!-- Acceptors -->
|
||||
<acceptors>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:5445</acceptor>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<!-- Clustering configuration -->
|
||||
|
|
|
@ -40,12 +40,12 @@ under the License.
|
|||
|
||||
<!-- Connectors -->
|
||||
<connectors>
|
||||
<connector name="netty-connector">tcp://localhost:5446</connector>
|
||||
<connector name="netty-connector">tcp://localhost:61617</connector>
|
||||
</connectors>
|
||||
|
||||
<!-- Acceptors -->
|
||||
<acceptors>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:5446</acceptor>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:61617</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<!-- Clustering configuration -->
|
||||
|
|
|
@ -40,12 +40,12 @@ under the License.
|
|||
|
||||
<!-- Connectors -->
|
||||
<connectors>
|
||||
<connector name="netty-connector">tcp://localhost:5447</connector>
|
||||
<connector name="netty-connector">tcp://localhost:61618</connector>
|
||||
</connectors>
|
||||
|
||||
<!-- Acceptors -->
|
||||
<acceptors>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:5447</acceptor>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:61618</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<!-- Clustering configuration -->
|
||||
|
|
|
@ -93,8 +93,8 @@ under the License.
|
|||
<configuration>
|
||||
<clientClass>org.apache.activemq.jms.example.ClusteredJgroupsExample</clientClass>
|
||||
<args>
|
||||
<param>tcp://localhost:5445</param>
|
||||
<param>tcp://localhost:5446</param>
|
||||
<param>tcp://localhost:61616</param>
|
||||
<param>tcp://localhost:61617</param>
|
||||
</args>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
|
|
@ -41,12 +41,12 @@ under the License.
|
|||
<!-- Connectors -->
|
||||
|
||||
<connectors>
|
||||
<connector name="netty-connector">tcp://localhost:5445</connector>
|
||||
<connector name="netty-connector">tcp://localhost:61616</connector>
|
||||
</connectors>
|
||||
|
||||
<!-- Acceptors -->
|
||||
<acceptors>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:5445</acceptor>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<!-- Clustering configuration -->
|
||||
|
|
|
@ -16,4 +16,4 @@
|
|||
# under the License.
|
||||
|
||||
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
|
||||
connectionFactory.ConnectionFactory=tcp://localhost:5445
|
||||
connectionFactory.ConnectionFactory=tcp://localhost:61616
|
||||
|
|
|
@ -40,12 +40,12 @@ under the License.
|
|||
|
||||
<!-- Connectors -->
|
||||
<connectors>
|
||||
<connector name="netty-connector">tcp://localhost:5446</connector>
|
||||
<connector name="netty-connector">tcp://localhost:61617</connector>
|
||||
</connectors>
|
||||
|
||||
<!-- Acceptors -->
|
||||
<acceptors>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:5446</acceptor>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:61617</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<!-- Clustering configuration -->
|
||||
|
|
|
@ -16,4 +16,4 @@
|
|||
# under the License.
|
||||
|
||||
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
|
||||
java.naming.provider.url=tcp://localhost:5446
|
||||
java.naming.provider.url=tcp://localhost:61617
|
||||
|
|
|
@ -89,8 +89,8 @@ under the License.
|
|||
<configuration>
|
||||
<clientClass>org.apache.activemq.jms.example.ClusteredQueueExample</clientClass>
|
||||
<args>
|
||||
<param>tcp://localhost:5445</param>
|
||||
<param>tcp://localhost:5446</param>
|
||||
<param>tcp://localhost:61616</param>
|
||||
<param>tcp://localhost:61617</param>
|
||||
</args>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
|
|
@ -40,12 +40,12 @@ under the License.
|
|||
<!-- Connectors -->
|
||||
|
||||
<connectors>
|
||||
<connector name="netty-connector">tcp://localhost:5445</connector>
|
||||
<connector name="netty-connector">tcp://localhost:61616</connector>
|
||||
</connectors>
|
||||
|
||||
<!-- Acceptors -->
|
||||
<acceptors>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:5445</acceptor>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<!-- Clustering configuration -->
|
||||
|
|
|
@ -40,12 +40,12 @@ under the License.
|
|||
|
||||
<!-- Connectors -->
|
||||
<connectors>
|
||||
<connector name="netty-connector">tcp://localhost:5446</connector>
|
||||
<connector name="netty-connector">tcp://localhost:61617</connector>
|
||||
</connectors>
|
||||
|
||||
<!-- Acceptors -->
|
||||
<acceptors>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:5446</acceptor>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:61617</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<!-- Clustering configuration -->
|
||||
|
|
|
@ -105,9 +105,9 @@ under the License.
|
|||
<configuration>
|
||||
<clientClass>org.apache.activemq.jms.example.ClusteredStandaloneExample</clientClass>
|
||||
<args>
|
||||
<param>tcp://localhost:5445</param>
|
||||
<param>tcp://localhost:5446</param>
|
||||
<param>tcp://localhost:5447</param>
|
||||
<param>tcp://localhost:61616</param>
|
||||
<param>tcp://localhost:61617</param>
|
||||
<param>tcp://localhost:61618</param>
|
||||
</args>
|
||||
<systemProperties>
|
||||
<property>
|
||||
|
|
|
@ -40,12 +40,12 @@ under the License.
|
|||
<!-- Connectors -->
|
||||
|
||||
<connectors>
|
||||
<connector name="netty-connector">tcp://localhost:5445</connector>
|
||||
<connector name="netty-connector">tcp://localhost:61616</connector>
|
||||
</connectors>
|
||||
|
||||
<!-- Acceptors -->
|
||||
<acceptors>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:5445</acceptor>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<!-- Clustering configuration -->
|
||||
|
|
|
@ -40,12 +40,12 @@ under the License.
|
|||
|
||||
<!-- Connectors -->
|
||||
<connectors>
|
||||
<connector name="netty-connector">tcp://localhost:5446</connector>
|
||||
<connector name="netty-connector">tcp://localhost:61617</connector>
|
||||
</connectors>
|
||||
|
||||
<!-- Acceptors -->
|
||||
<acceptors>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:5446</acceptor>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:61617</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<!-- Clustering configuration -->
|
||||
|
|
|
@ -40,12 +40,12 @@ under the License.
|
|||
|
||||
<!-- Connectors -->
|
||||
<connectors>
|
||||
<connector name="netty-connector">tcp://localhost:5447</connector>
|
||||
<connector name="netty-connector">tcp://localhost:61618</connector>
|
||||
</connectors>
|
||||
|
||||
<!-- Acceptors -->
|
||||
<acceptors>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:5447</acceptor>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:61618</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<!-- Clustering configuration -->
|
||||
|
|
|
@ -97,10 +97,10 @@ under the License.
|
|||
<configuration>
|
||||
<clientClass>org.apache.activemq.jms.example.StaticClusteredQueueExample</clientClass>
|
||||
<args>
|
||||
<param>tcp://localhost:5445</param>
|
||||
<param>tcp://localhost:5446</param>
|
||||
<param>tcp://localhost:5447</param>
|
||||
<param>tcp://localhost:5448</param>
|
||||
<param>tcp://localhost:61616</param>
|
||||
<param>tcp://localhost:61617</param>
|
||||
<param>tcp://localhost:61618</param>
|
||||
<param>tcp://localhost:61619</param>
|
||||
</args>
|
||||
<systemProperties>
|
||||
<property>
|
||||
|
|
|
@ -41,14 +41,14 @@ under the License.
|
|||
<!-- Connectors -->
|
||||
|
||||
<connectors>
|
||||
<connector name="netty-connector">tcp://localhost:5445</connector>
|
||||
<connector name="netty-connector">tcp://localhost:61616</connector>
|
||||
<!-- connector to the server1 -->
|
||||
<connector name="server1-connector">tcp://localhost:5446</connector>
|
||||
<connector name="server1-connector">tcp://localhost:61617</connector>
|
||||
</connectors>
|
||||
|
||||
<!-- Acceptors -->
|
||||
<acceptors>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:5445</acceptor>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<cluster-connections>
|
||||
|
|
|
@ -40,14 +40,14 @@ under the License.
|
|||
|
||||
<!-- Connectors -->
|
||||
<connectors>
|
||||
<connector name="netty-connector">tcp://localhost:5446</connector>
|
||||
<connector name="netty-connector">tcp://localhost:61617</connector>
|
||||
<!-- connector to the server0 -->
|
||||
<connector name="server0-connector">tcp://localhost:5445</connector>
|
||||
<connector name="server0-connector">tcp://localhost:61616</connector>
|
||||
</connectors>
|
||||
|
||||
<!-- Acceptors -->
|
||||
<acceptors>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:5446</acceptor>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:61617</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<!-- Clustering configuration -->
|
||||
|
|
|
@ -37,14 +37,14 @@
|
|||
|
||||
<!-- Connectors -->
|
||||
<connectors>
|
||||
<connector name="netty-connector">tcp://localhost:5447</connector>
|
||||
<connector name="netty-connector">tcp://localhost:61618</connector>
|
||||
<!-- connector to the server0 -->
|
||||
<connector name="server0-connector">tcp://localhost:5445</connector>
|
||||
<connector name="server0-connector">tcp://localhost:61616</connector>
|
||||
</connectors>
|
||||
|
||||
<!-- Acceptors -->
|
||||
<acceptors>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:5447</acceptor>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:61618</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<!-- Clustering configuration -->
|
||||
|
|
|
@ -37,14 +37,14 @@
|
|||
|
||||
<!-- Connectors -->
|
||||
<connectors>
|
||||
<connector name="netty-connector">tcp://localhost:5448</connector>
|
||||
<connector name="netty-connector">tcp://localhost:61619</connector>
|
||||
<!-- connector to the server0 -->
|
||||
<connector name="server0-connector">tcp://localhost:5445</connector>
|
||||
<connector name="server0-connector">tcp://localhost:61616</connector>
|
||||
</connectors>
|
||||
|
||||
<!-- Acceptors -->
|
||||
<acceptors>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:5448</acceptor>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:61619</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<!-- Clustering configuration -->
|
||||
|
|
|
@ -87,9 +87,9 @@ under the License.
|
|||
<configuration>
|
||||
<clientClass>org.apache.activemq.jms.example.ClusterStaticOnewayExample</clientClass>
|
||||
<args>
|
||||
<param>tcp://localhost:5445</param>
|
||||
<param>tcp://localhost:5446</param>
|
||||
<param>tcp://localhost:5447</param>
|
||||
<param>tcp://localhost:61616</param>
|
||||
<param>tcp://localhost:61617</param>
|
||||
<param>tcp://localhost:61618</param>
|
||||
</args>
|
||||
<systemProperties>
|
||||
<property>
|
||||
|
|
|
@ -38,14 +38,14 @@
|
|||
<!-- Connectors -->
|
||||
|
||||
<connectors>
|
||||
<connector name="netty-connector">tcp://localhost:5445</connector>
|
||||
<connector name="netty-connector">tcp://localhost:61616</connector>
|
||||
<!-- connector to the server1 -->
|
||||
<connector name="server1-connector">tcp://localhost:5446</connector>
|
||||
<connector name="server1-connector">tcp://localhost:61617</connector>
|
||||
</connectors>
|
||||
|
||||
<!-- Acceptors -->
|
||||
<acceptors>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:5445</acceptor>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<cluster-connections>
|
||||
|
|
|
@ -37,14 +37,14 @@
|
|||
|
||||
<!-- Connectors -->
|
||||
<connectors>
|
||||
<connector name="netty-connector">tcp://localhost:5446</connector>
|
||||
<connector name="netty-connector">tcp://localhost:61617</connector>
|
||||
<!-- connector to the server0 -->
|
||||
<connector name="server2-connector">tcp://localhost:5447</connector>
|
||||
<connector name="server2-connector">tcp://localhost:61618</connector>
|
||||
</connectors>
|
||||
|
||||
<!-- Acceptors -->
|
||||
<acceptors>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:5446</acceptor>
|
||||
<acceptor name="netty-acceptor">tcp://localhost:61617</acceptor>
|
||||
</acceptors>
|
||||
|
||||
<!-- Clustering configuration -->
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue