Archive › Documentation › Using ActiveMQ › Configuring Transports
Archived pageConfiguring Transports
Transport configuration options
The configuration of transports has changed a little from 4.x onwards. There now follows the 4.x configuration details.
| Be careful about whitespace All of the following URI configurations are based on the java.net.URI class which does not allow whitespace to be used. So if you are using failover: or static: URIs, do not put any whitespace around the , symbol. |
Transport URIs
One of the first kinds of URI you are like to use is a transport URI to connect to a broker using a kind of transport. Generally TCP or VM are the first transports you'll use.
The VM Transport
The VM transport allows clients to connect to each other inside the VM without the overhead of the network communication. The connection used is not a socket connection but use direct method invocations which enables a high performance embedded messaging system.
The first client to use the VM connection will boot an embedded broker. Subsequent connections will attach that the same broker. Once all VM connections to the broker have been closed, the embedded broker will automatically shutdown.
For more information see the VM Transport Reference
The TCP Transport
The TCP transport allows clients to connect a remote ActiveMQ using a a TCP socket.
For more information see the TCP Transport Reference
The SSL Transport
This allows you to talk over TCP using SSL.
For more information see the SSL Transport Reference
The Peer Transport
The Peer transport is composite transport which uses the VM transport to create and connecto to a local embedded broker but which configures the embedded broker to establish network connections to other peer emebedded brokers.
For more information see the Peer Transport Reference
The UDP Transport
This allows you to talk over UDP.
For more information see the UDP Transport Reference
The Multicast Transport
This allows you to talk over Multicast.
For more information see the Multicast Transport Reference
General Purpose URIs
You can configure other features via the URI syntax as follows...
Connection Configuration URI
Any Apache ActiveMQ JMS connection can be configured using the URL or explicitly setting properties on the ActiveMQConnection or ActiveMQConnectionFactory objects themselves.
For more information see Connection Configuration URI
Destination Options
You can configure various consumer related options using Destination Options which allow you to configure destinations using URI syntax
Broker Configuration URI
You can use the Broker Configuration URI to configure an embedded broker.
Configuring Wire Formats
Any transport which involves marshalling messages onto some kind of network transport like TCP or UDP will typically use the OpenWire format. This is configurable to customize how things appear on the wire.
For more information see Configuring Wire Formats
High Level Protocol URIs
The following higher level protocols can be configured via URI
The Failover Transport
The Failover transport layers reconnect logic on top of any of the other transports. This is what used to be the Reliable transport in ActiveMQ 3. It's configuration syntax allows you to specify any number of composite uris. The Failover transport randomly chooses one of the composite URI and attempts to establish a connection to it. If it does not succeed or if it subsequently fails, a new connection is established to one of the other uris in the list.
For more information see the Failover Transport Reference
The Static Transport
The static transport provides a hard coded mechanism to discover other connections using a list of URIs. A connection using this protocol will attempt to connect to each URI in the list until it is succesful.
For more information see the Static Transport Reference
The Discovery Transport
The Discovery transport works just like the reliable transport, except that it uses a discovery agent to locate the list of uri to connect to.
For more information see the Discovery Transport Reference
The Fanout Transport
The Fanout transport layers reconnect and replication logic on top of any of the other transports. It is used replicate commands to multiple brokers.
For more information see the Fanout Transport Reference
For details on how to configure 3.x transports see the ActiveMQ 3 Transport Configurations.