Jakarta Messaging
| Company type | Application programming interface |
|---|---|
| Industry | Software, Middleware |
| Predecessor | Java Message Service (JMS) API |
| Founder | Sun Microsystems |
Area served | Worldwide |
| Products | Messaging API for Java applications |
| Owner | Jakarta EE (Eclipse Foundation) |
| Parent | Jakarta EE |
| Website | jakarta |
The Jakarta Messaging API, previously known as the Java Message Service (JMS) API, is a Java application programming interface designed for message-oriented middleware. It offers standardized messaging frameworks that simplify the exchange of messages between software systems. Originally developed by Sun Microsystems, Jakarta Messaging is now incorporated within Jakarta EE and governed by the Java Community Process.
Concept of Messaging
Messaging facilitates loosely coupled communication in distributed systems by inserting an intermediary layer between software components. This approach minimizes the necessity for direct awareness between message producers and consumers, thereby enhancing integration across diverse platforms, boosting scalability, alleviating bottlenecks, and improving system responsiveness.
Release Timeline
- JMS 1.0
- JMS 1.0.1 (October 5, 1998)
- JMS 1.0.1a (October 30, 1998)
- JMS 1.0.2 (December 17, 1999)
- JMS 1.0.2a (December 23, 1999)
- JMS 1.0.2b (August 27, 2001)
- JMS 1.1 (April 12, 2002)
- JMS 2.0 (May 21, 2013)
- JMS 2.0a (March 16, 2015)
The JMS 2.0 specification continues to be managed under the Java Community Process as JSR 343. Development of JMS 3.0 is underway as part of Jakarta EE’s ongoing evolution.
Core Components
The essential components of JMS consist of:
- JMS provider
- The implementation that supports the JMS interface for message-oriented middleware (MOM), either through a native Java JMS system or via an adapter connecting to non-Java MOM solutions.
- JMS client
- Any application or process responsible for sending and/or receiving messages.
- JMS producer/publisher
- A client entity that generates and dispatches messages.
- JMS consumer/subscriber
- A client entity tasked with receiving messages.
- JMS message
- The data structure that encapsulates information transmitted between clients.
- JMS queue
- A holding area that stores messages destined for one consumer, ensuring ordered delivery and guaranteeing each message is processed only once.
- JMS topic
- A broadcast mechanism that distributes messages to multiple subscribers simultaneously.
Messaging Patterns
JMS supports two fundamental messaging paradigms:
- Point-to-point
- Publish-subscribe
Point-to-point paradigm
Within the point-to-point approach, messages are directed to specific queues intended for individual consumers. While numerous producers may send messages to a single queue, each message is delivered exclusively to one consumer. Queues maintain messages until they are either consumed or expire, providing reliable delivery even if no consumers are actively connected at the time.
Publish-subscribe architecture
The publish-subscribe paradigm delivers messages to multiple recipients through a designated message "topic." In this model, publishers and subscribers function independently, without direct awareness of each other’s presence.
- Messages can be delivered to zero or more recipients.
- Subscribers need to be online to receive messages unless they hold durable subscriptions, which enable message receipt upon reconnection.
JMS separates applications from the transport mechanism, allowing them to interact with various JMS providers via the Java Naming and Directory Interface (JNDI). Clients establish connections to queues or topics using a connection factory and proceed to send or receive messages accordingly.
URI scheme
The jms: URI scheme for Java Message Service is specified in RFC 6167.
JMS provider implementations
A JMS provider is essential for managing sessions, queues, and topics when utilizing JMS. Since Java EE 1.4, every Java EE application server is mandated to include a JMS provider, commonly realized through message inflow management as part of the Java EE Connector Architecture.
Prominent JMS providers encompass:
- Amazon SQS with its Java Messaging Library
- Apache ActiveMQ Classic
- Apache ActiveMQ Artemis
- Apache Qpid, which operates over AMQP
- IBM MQ (previously known as MQSeries/WebSphere MQ)
- Service Integration Bus (SIBus) within IBM WebSphere Application Server
- JBoss Messaging and HornetQ provided by JBoss
- JORAM developed by the OW2 Consortium
- Oracle’s Open Message Queue
- Open-source OpenJMS from the OpenJMS Group
- Oracle WebLogic Server alongside Oracle AQ
- PubSub+ platform from Solace
- RabbitMQ offered by Pivotal Software
- TIBCO Enterprise Message Service
See also
- Message Driven Beans
- Message queue — the fundamental principle behind JMS
- Service-oriented architecture
- Messaging frameworks that do not implement the JMS API:
- Advanced Message Queuing Protocol (AMQP) — a standardized protocol with diverse implementations
- Data Distribution Service (DDS) — OMG’s real-time messaging standard with interoperable implementations
- Microsoft Message Queuing — analogous technology for the .NET Framework