Chapter 4. Connecting to ActiveMQ
This chapter covers
- A description and demonstration of ActiveMQ connector URIs
- How to connect your clients to ActiveMQ using transport connectors
- How to create a cluster of ActiveMQ message brokers using network connectors
The main role of a JMS broker such as ActiveMQ is to provide a communication infrastructure for client applications. For that reason, ActiveMQ provides connectors, a connectivity mechanism that provides client-to-broker communications (using transport connectors) as well as broker-to-broker communications (using network connectors). ActiveMQ allows client applications to connect using a variety of protocols, but also allows other brokers to create communication channels and to build complex networks of ActiveMQ brokers.
We start this chapter by explaining connector URIs, which are used to address the broker. After that, we’ll dig into transport connectors and explain what protocols clients can use to connect to the ActiveMQ broker.
Note
We use the terms connector and protocol interchangeably. Protocols are general-purpose concepts and connectors are ActiveMQ-specific mechanisms, but every ActiveMQ connector, as you’ll see, implements a specific protocol and is named after it. It should be clear from the context whether we’re talking about a protocol in general or a specific ActiveMQ connector.