ActiveMQ is designed to support mutliple different topologies and protocols. Which one you use depends on your messaging requirements, quality of service and network topology. The following table describes the different network protocols available for JMS clients along with showing the connection URL string you use to enable this communication protocol. On the broker side there are additional transports supported. You can specify the connection URL on an ActiveMQConnectionFactory (in a constructor or via the brokerURL property). e.g. if you don't want to bother setting up JNDI and so forth and just wanna create a JMS connection you can do something like ConnectionFactory factory = new ActiveMQConnectionFactory("tcp://somehost:61616"); Connection connection = factory.createConnection(); Protocol Summary
The Server? column above indiciates whether or not a protocol can be used in an ActiveMQ broker transport connector. All of the above protocols can be used in a JMS client to connect to the messaging fabric; only those protocols indicated can be used in a broker-side transport connector. When connecting to an ActiveMQ broker, this could reside locally inside your JVM or be remote on another machine somewhere. If you want to enable the deployment of the ActiveMQ inside your JVM you can enable the useEmbeddedBroker property on the ActiveMQConnectionFactory. Please refer to the topologies overview to see how we can use ActiveMQ in many different topologies to suit your messaging needs. Specifying multiple URLs to connect toIf you want full HA to provide failover and auto-reconnection you can use the failover: prefix failover:(tcp://foo:61699,tcp://bar:61617,tcp://whatnot:61698) see Configuring Transports for more details |