This commit is contained in:
Martyn Taylor 2015-02-23 13:06:12 +00:00
commit cb24f3779e
23 changed files with 220 additions and 472 deletions

View File

@ -71,30 +71,12 @@
</remoting-incoming-interceptors> </remoting-incoming-interceptors>
<connectors> <connectors>
<connector name="connector1"> <connector name="connector1">tcp://localhost:5445</connector>
<factory-class>org.apache.activemq.tests.unit.core.config.impl.TestConnectorFactory1</factory-class> <connector name="connector2">vm://0</connector>
<param key="a1" value="v1"/>
<param key="a2" value="123"/>
<param key="a3" value="345"/>
<param key="a4" value="v4"/>
</connector>
<connector name="connector2">
<factory-class>org.apache.activemq.tests.unit.core.config.impl.TestConnectorFactory2</factory-class>
<param key="b1" value="w1"/>
<param key="b2" value="234"/>
</connector>
</connectors> </connectors>
<acceptors> <acceptors>
<acceptor name="acceptor1"> <acceptor name="acceptor1">tcp://localhost:5445</acceptor>
<factory-class>org.apache.activemq.tests.unit.core.config.impl.TestAcceptorFactory1</factory-class> <acceptor name="acceptor2">vm://0</acceptor>
<param key="d1" value="y1"/>
<param key="d2" value="456"/>
</acceptor>
<acceptor name="acceptor2">
<factory-class>org.apache.activemq.tests.unit.core.config.impl.TestAcceptorFactory2</factory-class>
<param key="e1" value="z1"/>
<param key="e2" value="567"/>
</acceptor>
</acceptors> </acceptors>
<broadcast-groups> <broadcast-groups>

View File

@ -71,30 +71,12 @@
</remoting-incoming-interceptors> </remoting-incoming-interceptors>
<connectors> <connectors>
<connector name="connector1"> <connector name="connector1">tcp://localhost:5445</connector>
<factory-class>org.apache.activemq.tests.unit.core.config.impl.TestConnectorFactory1</factory-class> <connector name="connector2">vm://0</connector>
<param key="a1" value="v1"/>
<param key="a2" value="123"/>
<param key="a3" value="345"/>
<param key="a4" value="v4"/>
</connector>
<connector name="connector2">
<factory-class>org.apache.activemq.tests.unit.core.config.impl.TestConnectorFactory2</factory-class>
<param key="b1" value="w1"/>
<param key="b2" value="234"/>
</connector>
</connectors> </connectors>
<acceptors> <acceptors>
<acceptor name="acceptor1"> <acceptor name="acceptor1">tcp://localhost:5445</acceptor>
<factory-class>org.apache.activemq.tests.unit.core.config.impl.TestAcceptorFactory1</factory-class> <acceptor name="acceptor2">vm://0</acceptor>
<param key="d1" value="y1"/>
<param key="d2" value="456"/>
</acceptor>
<acceptor name="acceptor2">
<factory-class>org.apache.activemq.tests.unit.core.config.impl.TestAcceptorFactory2</factory-class>
<param key="e1" value="z1"/>
<param key="e2" value="567"/>
</acceptor>
</acceptors> </acceptors>
<broadcast-groups> <broadcast-groups>

View File

@ -71,30 +71,12 @@
</remoting-incoming-interceptors> </remoting-incoming-interceptors>
<connectors> <connectors>
<connector name="connector1"> <connector name="connector1">tcp://localhost:5445</connector>
<factory-class>org.apache.activemq.tests.unit.core.config.impl.TestConnectorFactory1</factory-class> <connector name="connector2">vm://0</connector>
<param key="a1" value="v1"/>
<param key="a2" value="123"/>
<param key="a3" value="345"/>
<param key="a4" value="v4"/>
</connector>
<connector name="connector2">
<factory-class>org.apache.activemq.tests.unit.core.config.impl.TestConnectorFactory2</factory-class>
<param key="b1" value="w1"/>
<param key="b2" value="234"/>
</connector>
</connectors> </connectors>
<acceptors> <acceptors>
<acceptor name="acceptor1"> <acceptor name="acceptor1">tcp://localhost:5445</acceptor>
<factory-class>org.apache.activemq.tests.unit.core.config.impl.TestAcceptorFactory1</factory-class> <acceptor name="acceptor2">vm://0</acceptor>
<param key="d1" value="y1"/>
<param key="d2" value="456"/>
</acceptor>
<acceptor name="acceptor2">
<factory-class>org.apache.activemq.tests.unit.core.config.impl.TestAcceptorFactory2</factory-class>
<param key="e1" value="z1"/>
<param key="e2" value="567"/>
</acceptor>
</acceptors> </acceptors>
<broadcast-groups> <broadcast-groups>

View File

@ -71,30 +71,12 @@
</remoting-incoming-interceptors> </remoting-incoming-interceptors>
<connectors> <connectors>
<connector name="connector1"> <connector name="connector1">tcp://localhost:5445</connector>
<factory-class>org.apache.activemq.tests.unit.core.config.impl.TestConnectorFactory1</factory-class> <connector name="connector2">vm://0</connector>
<param key="a1" value="v1"/>
<param key="a2" value="123"/>
<param key="a3" value="345"/>
<param key="a4" value="v4"/>
</connector>
<connector name="connector2">
<factory-class>org.apache.activemq.tests.unit.core.config.impl.TestConnectorFactory2</factory-class>
<param key="b1" value="w1"/>
<param key="b2" value="234"/>
</connector>
</connectors> </connectors>
<acceptors> <acceptors>
<acceptor name="acceptor1"> <acceptor name="acceptor1">tcp://localhost:5445</acceptor>
<factory-class>org.apache.activemq.tests.unit.core.config.impl.TestAcceptorFactory1</factory-class> <acceptor>vm://0</acceptor>
<param key="d1" value="y1"/>
<param key="d2" value="456"/>
</acceptor>
<acceptor name="acceptor2">
<factory-class>org.apache.activemq.tests.unit.core.config.impl.TestAcceptorFactory2</factory-class>
<param key="e1" value="z1"/>
<param key="e2" value="567"/>
</acceptor>
</acceptors> </acceptors>
<broadcast-groups> <broadcast-groups>

View File

@ -71,30 +71,12 @@
</remoting-incoming-interceptors> </remoting-incoming-interceptors>
<connectors> <connectors>
<connector name="connector1"> <connector name="connector1">tcp://localhost:5445</connector>
<factory-class>org.apache.activemq.tests.unit.core.config.impl.TestConnectorFactory1</factory-class> <connector name="connector2">vm://0</connector>
<param key="a1" value="v1"/>
<param key="a2" value="123"/>
<param key="a3" value="345"/>
<param key="a4" value="v4"/>
</connector>
<connector name="connector2">
<factory-class>org.apache.activemq.tests.unit.core.config.impl.TestConnectorFactory2</factory-class>
<param key="b1" value="w1"/>
<param key="b2" value="234"/>
</connector>
</connectors> </connectors>
<acceptors> <acceptors>
<acceptor name="acceptor1"> <acceptor name="acceptor1">tcp://localhost:5445</acceptor>
<factory-class>org.apache.activemq.tests.unit.core.config.impl.TestAcceptorFactory1</factory-class> <acceptor name="acceptor2">vm://0</acceptor>
<param key="d1" value="y1"/>
<param key="d2" value="456"/>
</acceptor>
<acceptor name="acceptor2">
<factory-class>org.apache.activemq.tests.unit.core.config.impl.TestAcceptorFactory2</factory-class>
<param key="e1" value="z1"/>
<param key="e2" value="567"/>
</acceptor>
</acceptors> </acceptors>
<broadcast-groups> <broadcast-groups>

View File

@ -71,30 +71,12 @@
</remoting-incoming-interceptors> </remoting-incoming-interceptors>
<connectors> <connectors>
<connector name="connector1"> <connector name="connector1">tcp://localhost:5445</connector>
<factory-class>org.apache.activemq.tests.unit.core.config.impl.TestConnectorFactory1</factory-class> <connector name="connector2">vm://0</connector>
<param key="a1" value="v1"/>
<param key="a2" value="123"/>
<param key="a3" value="345"/>
<param key="a4" value="v4"/>
</connector>
<connector name="connector2">
<factory-class>org.apache.activemq.tests.unit.core.config.impl.TestConnectorFactory2</factory-class>
<param key="b1" value="w1"/>
<param key="b2" value="234"/>
</connector>
</connectors> </connectors>
<acceptors> <acceptors>
<acceptor name="acceptor1"> <acceptor name="acceptor1">tcp://localhost:5445</acceptor>
<factory-class>org.apache.activemq.tests.unit.core.config.impl.TestAcceptorFactory1</factory-class> <acceptor name="acceptor2">vm://0</acceptor>
<param key="d1" value="y1"/>
<param key="d2" value="456"/>
</acceptor>
<acceptor name="acceptor2">
<factory-class>org.apache.activemq.tests.unit.core.config.impl.TestAcceptorFactory2</factory-class>
<param key="e1" value="z1"/>
<param key="e2" value="567"/>
</acceptor>
</acceptors> </acceptors>
<broadcast-groups> <broadcast-groups>

View File

@ -18,93 +18,86 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-configuration.xsd"> xsi:schemaLocation="urn:activemq /schema/activemq-configuration.xsd">
<!-- We need to make it clustered otherwise the bridge won't deploy --> <core xmlns="urn:activemq:core">
<!-- We need to make it clustered otherwise the bridge won't deploy -->
<bindings-directory>${build.directory}/server0/data/messaging/bindings</bindings-directory> <bindings-directory>${build.directory}/server0/data/messaging/bindings</bindings-directory>
<journal-directory>${build.directory}/server0/data/messaging/journal</journal-directory> <journal-directory>${build.directory}/server0/data/messaging/journal</journal-directory>
<large-messages-directory>${build.directory}/server0/data/messaging/largemessages</large-messages-directory> <large-messages-directory>${build.directory}/server0/data/messaging/largemessages</large-messages-directory>
<paging-directory>${build.directory}/server0/data/messaging/paging</paging-directory> <paging-directory>${build.directory}/server0/data/messaging/paging</paging-directory>
<!-- Connectors --> <!-- Connectors -->
<connectors> <connectors>
<connector name="netty-connector"> <connector name="netty-connector">tcp://localhost:5445</connector>
<factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
<param key="port" value="5445"/>
</connector>
<!-- This connector corresponds to the New York server --> <!-- This connector corresponds to the New York server -->
<connector name="newyork-connector"> <connector name="newyork-connector">tcp://localhost:5446</connector>
<factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class> </connectors>
<param key="port" value="5446"/>
</connector>
</connectors>
<!-- Acceptors --> <!-- Acceptors -->
<acceptors> <acceptors>
<acceptor name="netty-acceptor"> <acceptor name="netty-acceptor">tcp://localhost:5445</acceptor>
<factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class> </acceptors>
<param key="port" value="5445"/>
</acceptor>
</acceptors>
<!-- Divert configuration --> <!-- Divert configuration -->
<!-- We need to create a core queue for the JMS queue explicitly because the bridge will be deployed <!-- We need to create a core queue for the JMS queue explicitly because the bridge will be deployed
before the JMS queue is deployed, so the first time, it otherwise won't find the queue --> before the JMS queue is deployed, so the first time, it otherwise won't find the queue -->
<queues> <queues>
<queue name="jms.queue.priceForwarding"> <queue name="jms.queue.priceForwarding">
<address>jms.queue.priceForwarding</address> <address>jms.queue.priceForwarding</address>
</queue> </queue>
</queues> </queues>
<diverts> <diverts>
<divert name="order-divert"> <divert name="order-divert">
<address>jms.queue.orders</address> <address>jms.queue.orders</address>
<forwarding-address>jms.topic.spyTopic</forwarding-address> <forwarding-address>jms.topic.spyTopic</forwarding-address>
<exclusive>false</exclusive> <exclusive>false</exclusive>
</divert> </divert>
<divert name="prices-divert"> <divert name="prices-divert">
<address>jms.topic.priceUpdates</address> <address>jms.topic.priceUpdates</address>
<forwarding-address>jms.queue.priceForwarding</forwarding-address> <forwarding-address>jms.queue.priceForwarding</forwarding-address>
<filter string="office='New York'"/> <filter string="office='New York'"/>
<transformer-class-name>org.apache.activemq.jms.example.AddForwardingTimeTransformer</transformer-class-name> <transformer-class-name>org.apache.activemq.jms.example.AddForwardingTimeTransformer</transformer-class-name>
<exclusive>true</exclusive> <exclusive>true</exclusive>
</divert> </divert>
</diverts> </diverts>
<!-- Bridge configuration --> <!-- Bridge configuration -->
<bridges> <bridges>
<bridge name="price-forward-bridge"> <bridge name="price-forward-bridge">
<queue-name>jms.queue.priceForwarding</queue-name> <queue-name>jms.queue.priceForwarding</queue-name>
<forwarding-address>jms.topic.newYorkPriceUpdates</forwarding-address> <forwarding-address>jms.topic.newYorkPriceUpdates</forwarding-address>
<reconnect-attempts>-1</reconnect-attempts> <reconnect-attempts>-1</reconnect-attempts>
<static-connectors> <static-connectors>
<connector-ref>newyork-connector</connector-ref> <connector-ref>newyork-connector</connector-ref>
</static-connectors> </static-connectors>
</bridge> </bridge>
</bridges> </bridges>
<!-- Other config --> <!-- Other config -->
<security-settings>
<!--security for example -->
<security-setting match="jms.#">
<permission type="createDurableQueue" roles="guest"/>
<permission type="deleteDurableQueue" roles="guest"/>
<permission type="createNonDurableQueue" roles="guest"/>
<permission type="deleteNonDurableQueue" roles="guest"/>
<permission type="consume" roles="guest"/>
<permission type="send" roles="guest"/>
</security-setting>
</security-settings>
<security-settings>
<!--security for example -->
<security-setting match="jms.#">
<permission type="createDurableQueue" roles="guest"/>
<permission type="deleteDurableQueue" roles="guest"/>
<permission type="createNonDurableQueue" roles="guest"/>
<permission type="deleteNonDurableQueue" roles="guest"/>
<permission type="consume" roles="guest"/>
<permission type="send" roles="guest"/>
</security-setting>
</security-settings>
</core>
</configuration> </configuration>

View File

@ -14,12 +14,7 @@ One of the most important concepts in ActiveMQ transports is the
defined in xml in the configuration file `activemq-configuration.xml`. defined in xml in the configuration file `activemq-configuration.xml`.
<acceptors> <acceptors>
<acceptor name="netty"> <acceptor name="netty">tcp://localhost:5446</acceptor>
<factory-class>
org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory
</factory-class>
<param key="port" value="5446"/>
</acceptor>
</acceptors> </acceptors>
Acceptors are always defined inside an `acceptors` element. There can be Acceptors are always defined inside an `acceptors` element. There can be
@ -33,26 +28,20 @@ In the above example we're defining an acceptor that uses
[Netty](http://netty.io/) to listen for connections at port [Netty](http://netty.io/) to listen for connections at port
`5446`. `5446`.
The `acceptor` element contains a sub-element `factory-class`, this The `acceptor` element contains a `URI` that defines the kind of Acceptor
element defines the factory used to create acceptor instances. In this to create along with its configuration. The `schema` part of the `URI`
case we're using Netty to listen for connections so we use the Netty defines the Acceptor type which can either be `tcp` or `vm` which is
implementation of an `AcceptorFactory` to do this. Basically, the `Netty` or an In VM Acceptor respectively. For `Netty` teh host and the
`factory-class` element determines which pluggable transport we're going port of the `URI` define what host and port the Acceptor will bind to. For
to use to do the actual listening. In VM the `Authority` part of the `URI` defines a unique server id.
The `acceptor` element can also be configured with zero or more `param` The `acceptor` can also be configured with a set of key, value pairs
sub-elements. Each `param` element defines a key-value pair. These used to configure the specific transport, the set of
key-value pairs are used to configure the specific transport, the set of
valid key-value pairs depends on the specific transport be used and are valid key-value pairs depends on the specific transport be used and are
passed straight through to the underlying transport. passed straight through to the underlying transport. These are set on the
`URI` as part of the query, like so:
Examples of key-value pairs for a particular transport would be, say, to <acceptor name="netty">tcp://localhost:5446?sslEnabled=true;key-store-path=/path</acceptor>
configure the IP address to bind to, or the port to listen at.
Note that unlike versions before 2.4 an Acceptor can now support
multiple protocols. By default this will be all available protocols but
can be limited by either the now deprecated `protocol` param or by
setting a comma seperated list to the newly added `protocols` parameter.
## Understanding Connectors ## Understanding Connectors
@ -64,12 +53,7 @@ Let's look at a connector defined in our `activemq-configuration.xml`
file: file:
<connectors> <connectors>
<connector name="netty"> <connector name="netty">tcp://localhost:5446</connector>
<factory-class>
org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory
</factory-class>
<param key="port" value="5446"/>
</connector>
</connectors> </connectors>
Connectors can be defined inside a `connectors` element. There can be Connectors can be defined inside a `connectors` element. There can be
@ -98,7 +82,7 @@ couple of reasons for this:
simple example: simple example:
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
java.naming.provider.url=tcp://myhost:5445 connectionFactory.MyConnectionFactory=tcp://myhost:5445
## Configuring the transport directly from the client side. ## Configuring the transport directly from the client side.
@ -171,7 +155,7 @@ We believe this caters for the vast majority of transport requirements.
## Single Port Support ## Single Port Support
As of version 2.4 ActiveMQ now supports using a single port for all ActiveMQ supports using a single port for all
protocols, ActiveMQ will automatically detect which protocol is being protocols, ActiveMQ will automatically detect which protocol is being
used CORE, AMQP, STOMP or OPENWIRE and use the appropriate ActiveMQ used CORE, AMQP, STOMP or OPENWIRE and use the appropriate ActiveMQ
handler. It will also detect whether protocols such as HTTP or Web handler. It will also detect whether protocols such as HTTP or Web
@ -180,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 It is possible to limit which protocols are supported by using the
`protocols` parameter on the Acceptor like so: `protocols` parameter on the Acceptor like so:
<param key="protocols" value="CORE,AMQP"/> <connector name="netty">tcp://localhost:5446?protocols=CORE,AMQP</connector>
> **Note** > **Note**
@ -211,6 +195,11 @@ parameters can be used either with acceptors or connectors, some only
work with acceptors. The following parameters can be used to configure work with acceptors. The following parameters can be used to configure
Netty for simple TCP: Netty for simple TCP:
> **Note**
>
> The `host` and `port` parameters are only used in the core API, in
> XML configuration these are set in the URI host and port.
- `use-nio`. If this is `true` then Java non blocking NIO will be - `use-nio`. If this is `true` then Java non blocking NIO will be
used. If set to `false` then old blocking Java IO will be used. used. If set to `false` then old blocking Java IO will be used.
@ -245,13 +234,13 @@ Netty for simple TCP:
connector) or to listen on (when configuring an acceptor). The connector) or to listen on (when configuring an acceptor). The
default value for this property is `5445`. default value for this property is `5445`.
- `tcp-no-delay`. If this is `true` then [Nagle's - `tcpNoDelay`. If this is `true` then [Nagle's
algorithm](http://en.wikipedia.org/wiki/Nagle%27s_algorithm) will be algorithm](http://en.wikipedia.org/wiki/Nagle%27s_algorithm) will be
disabled. This is a [Java (client) socket disabled. This is a [Java (client) socket
option](http://docs.oracle.com/javase/7/docs/technotes/guides/net/socketOpt.html). option](http://docs.oracle.com/javase/7/docs/technotes/guides/net/socketOpt.html).
The default value for this property is `true`. The default value for this property is `true`.
- `tcp-send-buffer-size`. This parameter determines the size of the - `tcpSendBufferSize`. This parameter determines the size of the
TCP send buffer in bytes. The default value for this property is TCP send buffer in bytes. The default value for this property is
`32768` bytes (32KiB). `32768` bytes (32KiB).
@ -270,18 +259,18 @@ Netty for simple TCP:
For fast networks you may want to increase the buffer sizes from the For fast networks you may want to increase the buffer sizes from the
defaults. defaults.
- `tcp-receive-buffer-size`. This parameter determines the size of the - `tcpReceiveBufferSize`. This parameter determines the size of the
TCP receive buffer in bytes. The default value for this property is TCP receive buffer in bytes. The default value for this property is
`32768` bytes (32KiB). `32768` bytes (32KiB).
- `batch-delay`. Before writing packets to the transport, ActiveMQ can - `batchDelay`. Before writing packets to the transport, ActiveMQ can
be configured to batch up writes for a maximum of `batch-delay` be configured to batch up writes for a maximum of `batch-delay`
milliseconds. This can increase overall throughput for very small milliseconds. This can increase overall throughput for very small
messages. It does so at the expense of an increase in average messages. It does so at the expense of an increase in average
latency for message transfer. The default value for this property is latency for message transfer. The default value for this property is
`0` ms. `0` ms.
- `direct-deliver`. When a message arrives on the server and is - `directDeliver`. When a message arrives on the server and is
delivered to waiting consumers, by default, the delivery is done on delivered to waiting consumers, by default, the delivery is done on
the same thread as that on which the message arrived. This gives the same thread as that on which the message arrived. This gives
good latency in environments with relatively small messages and a good latency in environments with relatively small messages and a
@ -293,7 +282,7 @@ Netty for simple TCP:
throughput set `direct-deliver` to `false throughput set `direct-deliver` to `false
`. `.
- `nio-remoting-threads`. When configured to use NIO, ActiveMQ will, - `nioRemotingThreads`. When configured to use NIO, ActiveMQ will,
by default, use a number of threads equal to three times the number by default, use a number of threads equal to three times the number
of cores (or hyper-threads) as reported by of cores (or hyper-threads) as reported by
`Runtime.getRuntime().availableProcessors()` for processing incoming `Runtime.getRuntime().availableProcessors()` for processing incoming
@ -302,14 +291,14 @@ Netty for simple TCP:
parameter is `-1` which means use the value from parameter is `-1` which means use the value from
`Runtime.getRuntime().availableProcessors()` \* 3. `Runtime.getRuntime().availableProcessors()` \* 3.
- `local-address`. When configured a Netty Connector it is possible to - `localAddress`. When configured a Netty Connector it is possible to
specify which local address the client will use when connecting to specify which local address the client will use when connecting to
the remote address. This is typically used in the Application Server the remote address. This is typically used in the Application Server
or when running Embedded to control which address is used for or when running Embedded to control which address is used for
outbound connections. If the local-address is not set then the outbound connections. If the local-address is not set then the
connector will use any local address available connector will use any local address available
- `local-port`. When configured a Netty Connector it is possible to - `localPort`. When configured a Netty Connector it is possible to
specify which local port the client will use when connecting to the specify which local port the client will use when connecting to the
remote address. This is typically used in the Application Server or remote address. This is typically used in the Application Server or
when running Embedded to control which port is used for outbound when running Embedded to control which port is used for outbound
@ -328,11 +317,11 @@ Please see the examples for a full working example of using Netty SSL.
Netty SSL uses all the same properties as Netty TCP but adds the Netty SSL uses all the same properties as Netty TCP but adds the
following additional properties: following additional properties:
- `ssl-enabled` - `sslEnabled`
Must be `true` to enable SSL. Default is `false`. Must be `true` to enable SSL. Default is `false`.
- `key-store-path` - `keyStorePath`
When used on an `acceptor` this is the path to the SSL key store on When used on an `acceptor` this is the path to the SSL key store on
the server which holds the server's certificates (whether the server which holds the server's certificates (whether
@ -350,7 +339,7 @@ following additional properties:
ActiveMQ-specific system property is useful if another component on ActiveMQ-specific system property is useful if another component on
client is already making use of the standard, Java system property. client is already making use of the standard, Java system property.
- `key-store-password` - `keyStorePassword`
When used on an `acceptor` this is the password for the server-side When used on an `acceptor` this is the password for the server-side
keystore. keystore.
@ -367,7 +356,7 @@ following additional properties:
another component on client is already making use of the standard, another component on client is already making use of the standard,
Java system property. Java system property.
- `trust-store-path` - `trustStorePath`
When used on an `acceptor` this is the path to the server-side SSL When used on an `acceptor` this is the path to the server-side SSL
key store that holds the keys of all the clients that the server key store that holds the keys of all the clients that the server
@ -385,7 +374,7 @@ following additional properties:
ActiveMQ-specific system property is useful if another component on ActiveMQ-specific system property is useful if another component on
client is already making use of the standard, Java system property. client is already making use of the standard, Java system property.
- `trust-store-password` - `trustStorePassword`
When used on an `acceptor` this is the password for the server-side When used on an `acceptor` this is the password for the server-side
trust store. This is only relevant for an `acceptor` if you are trust store. This is only relevant for an `acceptor` if you are
@ -402,19 +391,19 @@ following additional properties:
another component on client is already making use of the standard, another component on client is already making use of the standard,
Java system property. Java system property.
- `enabled-cipher-suites` - `enabledCipherSuites`
Whether used on an `acceptor` or `connector` this is a comma Whether used on an `acceptor` or `connector` this is a comma
separated list of cipher suites used for SSL communication. The separated list of cipher suites used for SSL communication. The
default value is `null` which means the JVM's default will be used. default value is `null` which means the JVM's default will be used.
- `enabled-protocols` - `enabledProtocols`
Whether used on an `acceptor` or `connector` this is a comma Whether used on an `acceptor` or `connector` this is a comma
separated list of protocols used for SSL communication. The default separated list of protocols used for SSL communication. The default
value is `null` which means the JVM's default will be used. value is `null` which means the JVM's default will be used.
- `need-client-auth` - `needClientAuth`
This property is only for an `acceptor`. It tells a client This property is only for an `acceptor`. It tells a client
connecting to this acceptor that 2-way SSL is required. Valid values connecting to this acceptor that 2-way SSL is required. Valid values
@ -430,22 +419,22 @@ Please see the examples for a full working example of using Netty HTTP.
Netty HTTP uses the same properties as Netty TCP but adds the following Netty HTTP uses the same properties as Netty TCP but adds the following
additional properties: additional properties:
- `http-enabled`. This is now no longer needed as of version 2.4. With - `httpEnabled`. This is now no longer needed as of version 2.4. With
single port support ActiveMQ will now automatically detect if http single port support ActiveMQ will now automatically detect if http
is being used and configure itself. is being used and configure itself.
- `http-client-idle-time`. How long a client can be idle before - `httpClientIdleTime`. How long a client can be idle before
sending an empty http request to keep the connection alive sending an empty http request to keep the connection alive
- `http-client-idle-scan-period`. How often, in milliseconds, to scan - `httpClientIdleScanPeriod`. How often, in milliseconds, to scan
for idle clients for idle clients
- `http-response-time`. How long the server can wait before sending an - `httpResponseTime`. How long the server can wait before sending an
empty http response to keep the connection alive empty http response to keep the connection alive
- `http-server-scan-period`. How often, in milliseconds, to scan for - `httpServerScanPeriod`. How often, in milliseconds, to scan for
clients needing responses clients needing responses
- `http-requires-session-id`. If true the client will wait after the - `httpRequiresSessionId`. If true the client will wait after the
first call to receive a session id. Used the http connector is first call to receive a session id. Used the http connector is
connecting to servlet acceptor (not recommended) connecting to servlet acceptor (not recommended)

View File

@ -15,11 +15,7 @@ ActiveMQ provides native support for Stomp. To be able to send and
receive Stomp messages, you must configure a `NettyAcceptor` with a receive Stomp messages, you must configure a `NettyAcceptor` with a
`protocols` parameter set to have `stomp`: `protocols` parameter set to have `stomp`:
<acceptor name="stomp-acceptor"> <acceptor name="stomp-acceptor">tcp://localhost:61613?protocols=STOMP</acceptor>
<factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
<param key="protocols" value="STOMP"/>
<param key="port" value="61613"/>
</acceptor>
With this configuration, ActiveMQ will accept Stomp connections on the With this configuration, ActiveMQ will accept Stomp connections on the
port `61613` (which is the default port of the Stomp brokers). port `61613` (which is the default port of the Stomp brokers).
@ -74,18 +70,13 @@ a connection-ttl value of 1 minute (see chapter on
[connection-ttl](#connection-ttl) for more information. This value can [connection-ttl](#connection-ttl) for more information. This value can
be overridden using connection-ttl-override. be overridden using connection-ttl-override.
If you need a specific connection-ttl for your stomp connections without If you need a specific connectionTtl for your stomp connections without
affecting the connection-ttl-override setting, you can configure your affecting the connectionTtlOverride setting, you can configure your
stomp acceptor with the "connection-ttl" property, which is used to set stomp acceptor with the "connectionTtl" property, which is used to set
the ttl for connections that are created from that acceptor. For the ttl for connections that are created from that acceptor. For
example: example:
<acceptor name="stomp-acceptor"> <acceptor name="stomp-acceptor">tcp://localhost:61613?protocols=STOMP;connectionTtl=20000</acceptor>
<factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
<param key="protocols" value="STOMP"/>
<param key="port" value="61613"/>
<param key="connection-ttl" value="20000"/>
</acceptor>
The above configuration will make sure that any stomp connection that is The above configuration will make sure that any stomp connection that is
created from that acceptor will have its connection-ttl set to 20 created from that acceptor will have its connection-ttl set to 20
@ -158,14 +149,9 @@ messages have no properties like JMSMessageID by default. However this
may bring some inconvenience to clients who wants an ID for their may bring some inconvenience to clients who wants an ID for their
purpose. ActiveMQ Stomp provides a parameter to enable message ID on purpose. ActiveMQ Stomp provides a parameter to enable message ID on
each incoming Stomp message. If you want each Stomp message to have a each incoming Stomp message. If you want each Stomp message to have a
unique ID, just set the `stomp-enable-message-id` to true. For example: unique ID, just set the `stompEnableMessageId` to true. For example:
<acceptor name="stomp-acceptor"> <acceptor name="stomp-acceptor">tcp://localhost:61613?protocols=STOMP;stompEnableMessageId=true</acceptor>
<factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
<param key="protocols" value="STOMP"/>
<param key="port" value="61613"/>
<param key="stomp-enable-message-id" value="true"/>
</acceptor>
When the server starts with the above setting, each stomp message sent When the server starts with the above setting, each stomp message sent
through this acceptor will have an extra property added. The property through this acceptor will have an extra property added. The property
@ -183,28 +169,23 @@ default is `false`.
Stomp clients may send very large bodys of frames which can exceed the Stomp clients may send very large bodys of frames which can exceed the
size of ActiveMQ server's internal buffer, causing unexpected errors. To size of ActiveMQ server's internal buffer, causing unexpected errors. To
prevent this situation from happening, ActiveMQ provides a stomp prevent this situation from happening, ActiveMQ provides a stomp
configuration attribute `stomp-min-large-message-size`. This attribute configuration attribute `stompMinLargeMessageSize`. This attribute
can be configured inside a stomp acceptor, as a parameter. For example: can be configured inside a stomp acceptor, as a parameter. For example:
<acceptor name="stomp-acceptor"> <acceptor name="stomp-acceptor">tcp://localhost:61613?protocols=STOMP;stompMinLargeMessageSize=10240</acceptor>
<factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
<param key="protocols" value="STOMP"/>
<param key="port" value="61613"/>
<param key="stomp-min-large-message-size" value="10240"/>
</acceptor>
The type of this attribute is integer. When this attributed is The type of this attribute is integer. When this attributed is
configured, ActiveMQ server will check the size of the body of each configured, ActiveMQ server will check the size of the body of each
Stomp frame arrived from connections established with this acceptor. If Stomp frame arrived from connections established with this acceptor. If
the size of the body is equal or greater than the value of the size of the body is equal or greater than the value of
`stomp-min-large-message`, the message will be persisted as a large `stompMinLargeMessageSize`, the message will be persisted as a large
message. When a large message is delievered to a stomp consumer, the message. When a large message is delievered to a stomp consumer, the
HorentQ server will automatically handle the conversion from a large HorentQ server will automatically handle the conversion from a large
message to a normal message, before sending it to the client. message to a normal message, before sending it to the client.
If a large message is compressed, the server will uncompressed it before If a large message is compressed, the server will uncompressed it before
sending it to stomp clients. The default value of sending it to stomp clients. The default value of
`stomp-min-large-message-size` is the same as the default value of `stompMinLargeMessageSize` is the same as the default value of
[min-large-message-size](#large-messages.core.config). [min-large-message-size](#large-messages.core.config).
### Stomp Over Web Sockets ### Stomp Over Web Sockets
@ -216,11 +197,7 @@ support Web Sockets can send and receive Stomp messages from ActiveMQ.
To enable Stomp over Web Sockets, you must configure a `NettyAcceptor` To enable Stomp over Web Sockets, you must configure a `NettyAcceptor`
with a `protocol` parameter set to `stomp_ws`: with a `protocol` parameter set to `stomp_ws`:
<acceptor name="stomp-ws-acceptor"> <acceptor name="stomp-ws-acceptor">tcp://localhost:61614?protocols=STOMP_WS</acceptor>
<factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
<param key="protocols" value="STOMP_WS"/>
<param key="port" value="61614"/>
</acceptor>
With this configuration, ActiveMQ will accept Stomp connections over Web With this configuration, ActiveMQ will accept Stomp connections over Web
Sockets on the port `61614` with the URL path `/stomp`. Web browser can Sockets on the port `61614` with the URL path `/stomp`. Web browser can
@ -269,11 +246,7 @@ ActiveMQ supports the [AMQP
specification. To enable AMQP you must configure a Netty Acceptor to specification. To enable AMQP you must configure a Netty Acceptor to
receive AMQP clients, like so: receive AMQP clients, like so:
<acceptor name="stomp-acceptor"> <acceptor name="stomp-acceptor">tcp://localhost:5672?protocols=AMQP</acceptor>
<factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
<param key="protocols" value="AMQP"/>
<param key="port" value="5672"/>
</acceptor>
ActiveMQ will then accept AMQP 1.0 clients on port 5672 which is the ActiveMQ will then accept AMQP 1.0 clients on port 5672 which is the
@ -331,11 +304,7 @@ ActiveMQ now supports the
ActiveMQ JMS client can talk directly to a ActiveMQ server. To enable ActiveMQ JMS client can talk directly to a ActiveMQ server. To enable
OpenWire support you must configure a Netty Acceptor, like so: OpenWire support you must configure a Netty Acceptor, like so:
<acceptor name="openwire-acceptor"> <acceptor name="openwire-acceptor">tcp://localhost:61616?protocols=OPENWIRE</acceptor>
<factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
<param key="protocols" value="OPENWIRE"/>
<param key="port" value="61616"/>
</acceptor>
The ActiveMQ server will then listens on port 61616 for incoming The ActiveMQ server will then listens on port 61616 for incoming

View File

@ -93,44 +93,11 @@ files.
configuration file. All the parameters in this file are described in configuration file. All the parameters in this file are described in
?. Please see ? for more information on this file. ?. Please see ? for more information on this file.
- `activemq-queues.xml`. This file contains predefined queues, queue
settings and security settings. The file is optional - all this
configuration can also live in `activemq-configuration.xml`. In
fact, the default configuration sets do not have a
`activemq-queues.xml` file. The purpose of allowing queues to be
configured in these files is to allow you to manage your queue
configuration over many files instead of being forced to maintain it
in a single file. There can be many `activemq-queues.xml` files on
the classpath. All will be loaded if found.
- `activemq-users.xml` ActiveMQ ships with a basic security manager
implementation which obtains user credentials from the
`activemq-users.xml` file. This file contains user, password and
role information. For more information on security, please see ?.
- `activemq-jms.xml` The distro configuration by default includes a
server side JMS service which mainly deploys JMS Queues, Topics and
ConnectionFactorys from this file into JNDI. If you're not using
JMS, or you don't need to deploy JMS objects on the server side,
then you don't need this file. For more information on using JMS,
please see the section on [Logging](logging.md).
> **Note**
>
> The property `file-deployment-enabled` in the
> `activemq-configuration.xml` configuration when set to false means
> that the other configuration files are not loaded. This is true by
> default.
It is also possible to use system property substitution in all the It is also possible to use system property substitution in all the
configuration files. by replacing a value with the name of a system configuration files. by replacing a value with the name of a system
property. Here is an example of this with a connector configuration: property. Here is an example of this with a connector configuration:
<connector name="netty"> <connector name="netty">tcp://${activemq.remoting.netty.host:localhost}:${activemq.remoting.netty.port:5445}</connector>
<factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
<param key="host" value="${activemq.remoting.netty.host:localhost}"/>
<param key="port" value="${activemq.remoting.netty.port:5445}"/>
</connector>
Here you can see we have replaced 2 values with system properties Here you can see we have replaced 2 values with system properties
`activemq.remoting.netty.host` and `activemq.remoting.netty.port`. These `activemq.remoting.netty.host` and `activemq.remoting.netty.port`. These

View File

@ -31,13 +31,7 @@ under the License.
<paging-directory>${build.directory}/server0/data/messaging/paging</paging-directory> <paging-directory>${build.directory}/server0/data/messaging/paging</paging-directory>
<!-- Acceptors --> <!-- Acceptors -->
<acceptors> <acceptors>
<acceptor name="netty-acceptor"> <acceptor name="netty-acceptor">tcp://172.16.8.10:5445?tcpNoDelay=false;tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576</acceptor>
<factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
<param key="tcp-no-delay" value="false"/>
<param key="tcp-send-buffer-size" value="1048576"/>
<param key="tcp-receive-buffer-size" value="1048576"/>
<param key="host" value="172.16.8.10"/>
</acceptor>
</acceptors> </acceptors>
<security-enabled>false</security-enabled> <security-enabled>false</security-enabled>

View File

@ -37,18 +37,11 @@ under the License.
<pre class="prettyprint"> <pre class="prettyprint">
<code> <code>
&lt;connector name=&quot;netty-connector&quot;&gt; &lt;connector name=&quot;netty-connector&quot;&gt;tcp://localhost:8080?httpEnabled=true&lt;/connector&gt;
&lt;factory-class&gt;org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory&lt;/factory-class&gt;
&lt;param key=&quot;activemq.remoting.netty.http-enabled&quot; value=&quot;true&quot; type=&quot;Boolean&quot;/&gt;
&lt;param key=&quot;activemq.remoting.netty.port&quot; value=&quot;8080&quot; type=&quot;Integer&quot;/&gt;
&lt;/connector&gt;
&lt;!-- Acceptors --&gt; &lt;!-- Acceptors --&gt;
&lt;acceptor name=&quot;netty-acceptor&quot;&gt; &lt;acceptor name=&quot;netty-acceptor&quot;&gt;tcp://localhost:8080 &lt;/acceptor&gt;
&lt;factory-class&gt;org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory&lt;/factory-class&gt;
&lt;param key=&quot;activemq.remoting.netty.port&quot; value=&quot;8080&quot; type=&quot;Integer&quot;/&gt;
&lt;/acceptor&gt;
</code> </code>
</pre> </pre>

View File

@ -51,10 +51,7 @@ under the License.
<p>This is totally optional and you don't need to follow this convention. You can use any port you chose including ActiveMQ's 5445 default port</p> <p>This is totally optional and you don't need to follow this convention. You can use any port you chose including ActiveMQ's 5445 default port</p>
<pre class="prettyprint"> <pre class="prettyprint">
<code> <code>
&lt;acceptor name="proton-acceptor"&gt; &lt;acceptor name="proton-acceptor"&gt;tcp://localhost:5672&lt;/acceptor&gt;
&lt;factory-class&gt;org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory&lt;/factory-class&gt;
&lt;param key="port" value="5672"/&gt;
&lt;/acceptor&gt;
</code> </code>
</pre> </pre>
<h2>Example step-by-step</h2> <h2>Example step-by-step</h2>

View File

@ -36,10 +36,7 @@ under the License.
<p>This is totally optional and you don't need to follow this convention. You can use any port you chose including ActiveMQ's 5445 default port</p> <p>This is totally optional and you don't need to follow this convention. You can use any port you chose including ActiveMQ's 5445 default port</p>
<pre class="prettyprint"> <pre class="prettyprint">
<code> <code>
&lt;acceptor name="proton-acceptor"&gt; &lt;acceptor name="proton-acceptor"&gt;tcp://localhost:5672&lt;/acceptor&gt;
&lt;factory-class&gt;org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory&lt;/factory-class&gt;
&lt;param key="port" value="5672"/&gt;
&lt;/acceptor&gt;
</code> </code>
</pre> </pre>
<h2>Example step-by-step</h2> <h2>Example step-by-step</h2>

View File

@ -38,11 +38,7 @@ under the License.
<p>To configure ActiveMQ to accept AMQP client connections you need to add an Acceptor like so:</p> <p>To configure ActiveMQ to accept AMQP client connections you need to add an Acceptor like so:</p>
<pre class="prettyprint"> <pre class="prettyprint">
<code> <code>
&lt;acceptor name="proton-acceptor"&gt; &lt;acceptor name="proton-acceptor"&gt;tcp://localhost:5672?protocols=AMQP&lt;/acceptor&gt;
&lt;factory-class&gt;org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory&lt;/factory-class&gt;
&lt;param key="protocol" value="AMQP"/&gt;
&lt;param key="port" value="5672"/&gt;
&lt;/acceptor&gt;
</code> </code>
</pre> </pre>
<h2>Example step-by-step</h2> <h2>Example step-by-step</h2>

View File

@ -29,9 +29,7 @@ under the License.
<!-- Connectors --> <!-- Connectors -->
<connectors> <connectors>
<connector name="netty-connector"> <connector name="netty-connector">tcp://localhost:5445</connector>
<factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
</connector>
</connectors> </connectors>
</core> </core>

View File

@ -29,9 +29,7 @@ under the License.
<!-- Connectors --> <!-- Connectors -->
<connectors> <connectors>
<connector name="netty-connector"> <connector name="netty-connector">tcp://localhost:5445</connector>
<factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
</connector>
</connectors> </connectors>
</core> </core>

View File

@ -29,9 +29,7 @@ under the License.
<!-- Connectors --> <!-- Connectors -->
<connectors> <connectors>
<connector name="netty-connector"> <connector name="netty-connector">tcp://localhost:5445</connector>
<factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
</connector>
</connectors> </connectors>
</core> </core>

View File

@ -37,25 +37,11 @@ under the License.
<code> <code>
&lt;!-- Connector --&gt; &lt;!-- Connector --&gt;
&lt;connector name=&quot;netty-ssl-connector&quot;&gt; &lt;connector name=&quot;netty-ssl-connector&quot;&gt;tcp://localhost:5500?sslEnabled=true;keyStorePath=activemq/server0/activemq.example.keystore;keyStorePassword=activemqexample&lt;/connector&gt;
&lt;factory-class&gt;org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory&lt;/factory-class&gt;
&lt;param key=&quot;activemq.remoting.netty.host&quot; value=&quot;localhost&quot; type=&quot;String&quot;/&gt;
&lt;param key=&quot;activemq.remoting.netty.port&quot; value=&quot;5500&quot; type=&quot;Integer&quot;/&gt;
&lt;param key=&quot;activemq.remoting.netty.ssl-enabled&quot; value=&quot;true&quot; type=&quot;Boolean&quot;/&gt;
&lt;param key=&quot;activemq.remoting.netty.trust-store-path&quot; value=&quot;server0/activemq.example.truststore&quot; type=&quot;String&quot;/&gt;
&lt;param key=&quot;activemq.remoting.netty.trust-store-password&quot; value=&quot;activemqexample&quot; type=&quot;String&quot;/&gt;
&lt;/connector&gt;
&lt;!-- Acceptor --&gt; &lt;!-- Acceptor --&gt;
&lt;acceptor name=&quot;netty-ssl-acceptor&quot;&gt; &lt;acceptor name=&quot;netty-ssl-acceptor&quot;&gt;tcp://localhost:5500?sslEnabled=true;keyStorePath=activemq/server0/activemq.example.keystore;keyStorePassword=activemqexample&lt;/acceptor&gt;
&lt;factory-class&gt;org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory&lt;/factory-class&gt;
&lt;param key=&quot;activemq.remoting.netty.host&quot; value=&quot;localhost&quot; type=&quot;String&quot;/&gt;
&lt;param key=&quot;activemq.remoting.netty.port&quot; value=&quot;5500&quot; type=&quot;Integer&quot;/&gt;
&lt;param key=&quot;activemq.remoting.netty.ssl-enabled&quot; value=&quot;true&quot; type=&quot;Boolean&quot;/&gt;
&lt;param key=&quot;activemq.remoting.netty.key-store-path&quot; value=&quot;activemq.example.keystore&quot; type=&quot;String&quot;/&gt;
&lt;param key=&quot;activemq.remoting.netty.key-store-password&quot; value=&quot;activemqexample&quot; type=&quot;String&quot;/&gt;
&lt;/acceptor&gt;
</code> </code>
</pre> </pre>

View File

@ -32,10 +32,7 @@ under the License.
<p>The example will start a ActiveMQ server configured with Stomp over Web Sockets and JMS. Web browsers clients and <p>The example will start a ActiveMQ server configured with Stomp over Web Sockets and JMS. Web browsers clients and
Java application will exchange message using a JMS Topic.</p></para> Java application will exchange message using a JMS Topic.</p></para>
<pre class="prettyprint"> <pre class="prettyprint">
&lt;acceptor name="stomp-websocket"> &lt;acceptor name="stomp-websocket">tcp://localhost:61614&lt;/acceptor></pre>
&lt;factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory&lt;/factory-class>
&lt;param key="port" value="61614"/>
&lt;/acceptor></pre>
<h2>Example step-by-step</h2> <h2>Example step-by-step</h2>

View File

@ -16,42 +16,35 @@
--> -->
<configuration xmlns="urn:activemq" <configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-configuration.xsd"> xsi:schemaLocation="urn:activemq /schema/activemq-server.xsd">
<core xmlns="urn:activemq:core">
<journal-directory>/tmp/activemq-unit-test/start-stop-data-backup</journal-directory>
<!-- Connectors -->
<connectors>
<connector name="netty-connector">tcp://localhost:5446</connector>
</connectors>
<!-- Acceptors -->
<acceptors>
<acceptor name="netty-acceptor">tcp://localhost:5446</acceptor>
</acceptors>
<backup>true</backup> <security-enabled>false</security-enabled>
<journal-directory>/tmp/activemq-unit-test/start-stop-data-backup</journal-directory> <queues>
<queue name="myQueue">
<!-- Connectors --> <address>myAddress</address>
</queue>
<connectors>
<connector name="netty-connector">
<factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
<param key="port" value="5446"/>
</connector>
</connectors>
<!-- Acceptors -->
<acceptors>
<acceptor name="netty-acceptor">
<factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
<param key="port" value="5446"/>
</acceptor>
</acceptors>
<security-enabled>false</security-enabled>
<queues>
<queue name="myQueue">
<address>myAddress</address>
</queue>
<queue name="jms.queue.myJMSQueue">
<address>jms.queue.myJMSAddress</address>
</queue>
</queues>
<queue name="jms.queue.myJMSQueue">
<address>jms.queue.myJMSAddress</address>
</queue>
</queues>
</core>
</configuration> </configuration>

View File

@ -16,46 +16,37 @@
--> -->
<configuration xmlns="urn:activemq" <configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq ../../../src/schema/activemq-configuration.xsd"> xsi:schemaLocation="urn:activemq /schema/activemq-server.xsd">
<core xmlns="urn:activemq:core">
<backup-connector-ref connector-name="backup-connector"/> <journal-directory>/tmp/activemq-unit-test/start-stop-data-live</journal-directory>
<journal-directory>/tmp/activemq-unit-test/start-stop-data-live</journal-directory> <!-- Connectors -->
<!-- Connectors --> <connectors>
<connector name="netty-connector">tcp://localhost:5445</connector>
<connectors> <connector name="backup-connector">tcp://localhost:5446</connector>
<connector name="netty-connector"> </connectors>
<factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
<param key="port" value="5445"/>
</connector>
<connector name="backup-connector"> <!-- Acceptors -->
<factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class> <acceptors>
<param key="port" value="5446"/> <acceptor name="netty-acceptor">172.16.8.10</acceptor>
</connector> </acceptors>
</connectors>
<!-- Acceptors --> <security-enabled>false</security-enabled>
<acceptors>
<acceptor name="netty-acceptor">
<factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
<param key="port" value="5445"/>
</acceptor>
</acceptors>
<security-enabled>false</security-enabled> <queues>
<queue name="myQueue">
<address>myAddress</address>
</queue>
<queues> <queue name="jms.queue.myJMSQueue">
<queue name="myQueue"> <address>jms.queue.myJMSAddress</address>
<address>myAddress</address> </queue>
</queue> </queues>
</core>
<queue name="jms.queue.myJMSQueue">
<address>jms.queue.myJMSAddress</address>
</queue>
</queues>
</configuration> </configuration>