Chapter 2. ActiveMQ

ActiveMQ is best described as a classical messaging system. It was written in 2004, filling a need for an open source message broker. At the time if you wanted to use messaging within your applications, the only choices were expensive commercial products.

ActiveMQ was designed to implement the Java Message Service (JMS) specification. This decision was made in order to fill the requirement for a JMS-compliant messaging implementation in the Apache Geronimo project—an open source J2EE application server.

A messaging system (or message-oriented middleware, as it is sometimes called) that implements the JMS specification is composed of the following constructs:

Broker

The centralized piece of middleware that distributes messages.

Client

A piece of software that exchanges messages using a broker. This in turn is made up of the following artifacts:

  • Your code, which uses the JMS API.

  • The JMS API—a set of interfaces for interacting with the broker according to guarantees laid out in the JMS specification.

  • The system’s client library, which provides the implementation of the API and communicates with the broker.

The client and broker communicate with each other through an application layer protocol, also known as a wire protocol (Figure 2-1). The JMS specification left the details of this protocol up to individual implementations.

JMS overview
Figure 2-1. JMS overview ...

Get Understanding Message Brokers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.