Getting Started With JMS-ActiveMQ: Explained in a Simple Way

Java Message Service (JMS) is a very useful open source that works as a message-oriented middleware.

About JMS

  • The Java Message Service (JMS) API is a messaging standard that allows application components based on the Java Platform Enterprise Edition (Java EE) to create, send, receive, and read messages.
  • It enables distributed communication that is loosely coupled, reliable, and asynchronous.
  • Messaging is a technique to communicate with different software components and/or applications.
  • JMS, a messaging service, is mainly used to send and receive messages from one application to another.
  • There are different JMS brokers/providers like ActiveMQ, RabbitMQ, OpenMQ, etc.
  • I will be using ActiveMQ for this tutorial.

About ActiveMQ

  • ActiveMQ is a messaging service that facilitates disparate data at scale in enterprise systems. 
  • ActiveMQ is a popular open-source messaging service that is built in Java. 
  • It works as a message-oriented middleware or MoM for short.

Setting Up ActiveMQ

  • Java must be installed and set up (JAVA_HOME and PATH variables). I am using Java 8 for this tutorial.
  • Download ActiveMQ (we will use "Classic" for this tutorial)

ActiveMQ classic

Comparison: JMS Message Queue vs. Apache Kafka

Comparing JMS-based message queue (MQ) infrastructures and Apache Kafka-based data streaming is a widespread topic. Unfortunately, the battle is an apple-to-orange comparison that often includes misinformation and FUD from vendors. This article explores the differences, trade-offs, and architectures of JMS message brokers and Kafka deployments. Learn how to choose between JMS brokers like IBM MQ or RabbitMQ and open-source Kafka or serverless cloud services like Confluent Cloud.

Motivation: The Battle of Apples vs. Oranges

I have to discuss the differences and trade-offs between JMS message brokers and Apache Kafka every week in customer meetings. What annoys me most is the common misunderstandings and (sometimes) intentional FUD in various blogs, articles, and presentations about this discussion.

Open Source Integration With Apache Camel and How Fuse IDE Can Help

Take any integration project and you have multiple applications talking over multiple transports on multiple platforms. As you can imagine, in large enterprises, applications like this can get complex very fast. Much of the complexity stems from two issues:

  1. Dealing with the specifics of applications and transports
  2. Coming up with good solutions to integration problems

Making your applications speak transports and APIs is relatively easy on its own. I'm sure everyone knows how to send JMS messages to their broker of choice; though it still requires in-depth knowledge of the JMS specification, which many developers may not have. On top of that, what happens when you want to route that JMS message to another application? You then have to take care of mapping the JMS message to the application plus handle any new concepts related to the application. Add a dozen other applications into the mix and you've got quite a headache on your hands.