Merge PR #107
This commit is contained in:
commit
cb24f3779e
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
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">
|
||||||
|
|
||||||
|
<core xmlns="urn:activemq:core">
|
||||||
|
|
||||||
<!-- We need to make it clustered otherwise the bridge won't deploy -->
|
<!-- We need to make it clustered otherwise the bridge won't deploy -->
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,26 +34,17 @@
|
||||||
<!-- 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>
|
|
||||||
<param key="port" value="5446"/>
|
|
||||||
</connector>
|
|
||||||
</connectors>
|
</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>
|
|
||||||
<param key="port" value="5445"/>
|
|
||||||
</acceptor>
|
|
||||||
</acceptors>
|
</acceptors>
|
||||||
|
|
||||||
<!-- Divert configuration -->
|
<!-- Divert configuration -->
|
||||||
|
@ -106,5 +99,5 @@
|
||||||
<permission type="send" roles="guest"/>
|
<permission type="send" roles="guest"/>
|
||||||
</security-setting>
|
</security-setting>
|
||||||
</security-settings>
|
</security-settings>
|
||||||
|
</core>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -37,18 +37,11 @@ under the License.
|
||||||
|
|
||||||
<pre class="prettyprint">
|
<pre class="prettyprint">
|
||||||
<code>
|
<code>
|
||||||
<connector name="netty-connector">
|
<connector name="netty-connector">tcp://localhost:8080?httpEnabled=true</connector>
|
||||||
<factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
|
|
||||||
<param key="activemq.remoting.netty.http-enabled" value="true" type="Boolean"/>
|
|
||||||
<param key="activemq.remoting.netty.port" value="8080" type="Integer"/>
|
|
||||||
</connector>
|
|
||||||
|
|
||||||
<!-- Acceptors -->
|
<!-- Acceptors -->
|
||||||
|
|
||||||
<acceptor name="netty-acceptor">
|
<acceptor name="netty-acceptor">tcp://localhost:8080 </acceptor>
|
||||||
<factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
|
|
||||||
<param key="activemq.remoting.netty.port" value="8080" type="Integer"/>
|
|
||||||
</acceptor>
|
|
||||||
</code>
|
</code>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|
|
@ -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>
|
||||||
<acceptor name="proton-acceptor">
|
<acceptor name="proton-acceptor">tcp://localhost:5672</acceptor>
|
||||||
<factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
|
|
||||||
<param key="port" value="5672"/>
|
|
||||||
</acceptor>
|
|
||||||
</code>
|
</code>
|
||||||
</pre>
|
</pre>
|
||||||
<h2>Example step-by-step</h2>
|
<h2>Example step-by-step</h2>
|
||||||
|
|
|
@ -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>
|
||||||
<acceptor name="proton-acceptor">
|
<acceptor name="proton-acceptor">tcp://localhost:5672</acceptor>
|
||||||
<factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
|
|
||||||
<param key="port" value="5672"/>
|
|
||||||
</acceptor>
|
|
||||||
</code>
|
</code>
|
||||||
</pre>
|
</pre>
|
||||||
<h2>Example step-by-step</h2>
|
<h2>Example step-by-step</h2>
|
||||||
|
|
|
@ -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>
|
||||||
<acceptor name="proton-acceptor">
|
<acceptor name="proton-acceptor">tcp://localhost:5672?protocols=AMQP</acceptor>
|
||||||
<factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
|
|
||||||
<param key="protocol" value="AMQP"/>
|
|
||||||
<param key="port" value="5672"/>
|
|
||||||
</acceptor>
|
|
||||||
</code>
|
</code>
|
||||||
</pre>
|
</pre>
|
||||||
<h2>Example step-by-step</h2>
|
<h2>Example step-by-step</h2>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
||||||
|
|
|
@ -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>
|
||||||
|
|
||||||
|
|
|
@ -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>
|
||||||
|
|
||||||
|
|
|
@ -37,25 +37,11 @@ under the License.
|
||||||
<code>
|
<code>
|
||||||
<!-- Connector -->
|
<!-- Connector -->
|
||||||
|
|
||||||
<connector name="netty-ssl-connector">
|
<connector name="netty-ssl-connector">tcp://localhost:5500?sslEnabled=true;keyStorePath=activemq/server0/activemq.example.keystore;keyStorePassword=activemqexample</connector>
|
||||||
<factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
|
|
||||||
<param key="activemq.remoting.netty.host" value="localhost" type="String"/>
|
|
||||||
<param key="activemq.remoting.netty.port" value="5500" type="Integer"/>
|
|
||||||
<param key="activemq.remoting.netty.ssl-enabled" value="true" type="Boolean"/>
|
|
||||||
<param key="activemq.remoting.netty.trust-store-path" value="server0/activemq.example.truststore" type="String"/>
|
|
||||||
<param key="activemq.remoting.netty.trust-store-password" value="activemqexample" type="String"/>
|
|
||||||
</connector>
|
|
||||||
|
|
||||||
<!-- Acceptor -->
|
<!-- Acceptor -->
|
||||||
|
|
||||||
<acceptor name="netty-ssl-acceptor">
|
<acceptor name="netty-ssl-acceptor">tcp://localhost:5500?sslEnabled=true;keyStorePath=activemq/server0/activemq.example.keystore;keyStorePassword=activemqexample</acceptor>
|
||||||
<factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
|
|
||||||
<param key="activemq.remoting.netty.host" value="localhost" type="String"/>
|
|
||||||
<param key="activemq.remoting.netty.port" value="5500" type="Integer"/>
|
|
||||||
<param key="activemq.remoting.netty.ssl-enabled" value="true" type="Boolean"/>
|
|
||||||
<param key="activemq.remoting.netty.key-store-path" value="activemq.example.keystore" type="String"/>
|
|
||||||
<param key="activemq.remoting.netty.key-store-password" value="activemqexample" type="String"/>
|
|
||||||
</acceptor>
|
|
||||||
|
|
||||||
</code>
|
</code>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
|
@ -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">
|
||||||
<acceptor name="stomp-websocket">
|
<acceptor name="stomp-websocket">tcp://localhost:61614</acceptor></pre>
|
||||||
<factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
|
|
||||||
<param key="port" value="61614"/>
|
|
||||||
</acceptor></pre>
|
|
||||||
|
|
||||||
<h2>Example step-by-step</h2>
|
<h2>Example step-by-step</h2>
|
||||||
|
|
||||||
|
|
|
@ -16,28 +16,21 @@
|
||||||
-->
|
-->
|
||||||
<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">
|
||||||
<backup>true</backup>
|
|
||||||
|
|
||||||
<journal-directory>/tmp/activemq-unit-test/start-stop-data-backup</journal-directory>
|
<journal-directory>/tmp/activemq-unit-test/start-stop-data-backup</journal-directory>
|
||||||
|
|
||||||
<!-- Connectors -->
|
<!-- Connectors -->
|
||||||
|
|
||||||
<connectors>
|
<connectors>
|
||||||
<connector name="netty-connector">
|
<connector name="netty-connector">tcp://localhost:5446</connector>
|
||||||
<factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
|
|
||||||
<param key="port" value="5446"/>
|
|
||||||
</connector>
|
|
||||||
</connectors>
|
</connectors>
|
||||||
|
|
||||||
<!-- Acceptors -->
|
<!-- Acceptors -->
|
||||||
<acceptors>
|
<acceptors>
|
||||||
<acceptor name="netty-acceptor">
|
<acceptor name="netty-acceptor">tcp://localhost:5446</acceptor>
|
||||||
<factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
|
|
||||||
<param key="port" value="5446"/>
|
|
||||||
</acceptor>
|
|
||||||
</acceptors>
|
</acceptors>
|
||||||
|
|
||||||
|
|
||||||
|
@ -52,6 +45,6 @@
|
||||||
<address>jms.queue.myJMSAddress</address>
|
<address>jms.queue.myJMSAddress</address>
|
||||||
</queue>
|
</queue>
|
||||||
</queues>
|
</queues>
|
||||||
|
</core>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
||||||
|
|
|
@ -16,33 +16,23 @@
|
||||||
-->
|
-->
|
||||||
<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>
|
<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>
|
|
||||||
|
|
||||||
<connector name="backup-connector">
|
<connector name="backup-connector">tcp://localhost:5446</connector>
|
||||||
<factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
|
|
||||||
<param key="port" value="5446"/>
|
|
||||||
</connector>
|
|
||||||
</connectors>
|
</connectors>
|
||||||
|
|
||||||
<!-- Acceptors -->
|
<!-- Acceptors -->
|
||||||
<acceptors>
|
<acceptors>
|
||||||
<acceptor name="netty-acceptor">
|
<acceptor name="netty-acceptor">172.16.8.10</acceptor>
|
||||||
<factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
|
|
||||||
<param key="port" value="5445"/>
|
|
||||||
</acceptor>
|
|
||||||
</acceptors>
|
</acceptors>
|
||||||
|
|
||||||
<security-enabled>false</security-enabled>
|
<security-enabled>false</security-enabled>
|
||||||
|
@ -56,6 +46,7 @@
|
||||||
<address>jms.queue.myJMSAddress</address>
|
<address>jms.queue.myJMSAddress</address>
|
||||||
</queue>
|
</queue>
|
||||||
</queues>
|
</queues>
|
||||||
|
</core>
|
||||||
|
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue