JMS Tutorials

JMS Tutorials

In this detailed Resource page, we feature an abundance of JMS Tutorials!

The Java Message Service (JMS) API is a Java message-oriented middleware API for sending messages between two or more clients. It is an implementation to handle the producer–consumer problem. JMS is a part of the Java Platform, Enterprise Edition (Java EE), and was defined by a specification developed at Sun Microsystems, but which has since been guided by the Java Community Process. It is a messaging standard that allows application components based on Java EE to create, send, receive, and read messages. It allows the communication between different components of a distributed application to be loosely coupled, reliable, and asynchronous.


The following are JMS elements:

  • JMS provider
    An implementation of the JMS interface for message-oriented middleware (MOM). Providers are implemented as either a Java JMS implementation or an adapter to a non-Java MOM.
  • JMS client
    An application or process that produces and/or receives messages.
  • JMS producer/publisher
    A JMS client that creates and sends messages.
  • JMS consumer/subscriber
    A JMS client that receives messages.
  • JMS message
    An object that contains the data being transferred between JMS clients.
  • JMS queue
    A staging area that contains messages that have been sent and are waiting to be read (by only one consumer). Contrary to what the name queue suggests, messages don’t have to be received in the order in which they were sent. A JMS queue only guarantees that each message is processed only once.
  • JMS topic
    A distribution mechanism for publishing messages that are delivered to multiple subscribers.


The JMS API supports two distinct models:

  • Point-to-point
  • Publish-and-subscribe

Provider implementations

To use JMS, one must have a JMS provider that can manage the sessions, queues and topics. Starting from Java EE version 1.4, a JMS provider has to be contained in all Java EE application servers. This can be implemented using the message inflow management of the Java EE Connector Architecture, which was first made available in that version.

The following is a list of common JMS providers:

  • Amazon SQS’s Java Messaging Library
  • Apache ActiveMQ
  • Apache Qpid, using AMQP
  • IBM MQ (formerly MQSeries, then WebSphere MQ)
  • IBM WebSphere Application Server’s Service Integration Bus (SIBus)
  • JBoss Messaging and HornetQ from JBoss
  • JORAM from the OW2 Consortium
  • Open Message Queue from Oracle
  • OpenJMS from the OpenJMS Group
  • Oracle WebLogic Server and Oracle AQ
  • RabbitMQ from Pivotal Software
If you wish to build up your JMS knowledge first, check out our Apache ActiveMQ Tutorial for beginners.

JMS Tutorials – Getting Started

Simple examples based on various JMS providers

Apache ActiveMQ


  • Java JMS “HelloWorld” on JBoss Example
    In this article, I am going to show a simple “Hello World” example using JBoss Messaging.
  • Simple JMS example on JBoss 5.1
    In this example we shall show you how to create a simple hello World example in JMS, using JBoss 5.1. JMS is a very popular API standard for messaging, and most messaging systems provide a JMS API.

JMS Tutorials – Integrations

Learn how to use JMS with Spring Framework


Back to top button