Jakarta Messaging
The Jakarta Messaging API is a Java application programming interface for message-oriented middleware. It provides generic messaging models, able to handle the producer–consumer problem, that can be used to facilitate the sending and receiving of messages between software systems. Jakarta Messaging is a part of Jakarta EE and was originally defined by a specification developed at Sun Microsystems before being guided by the Java Community Process.
General idea of messaging
Messaging is a form of loosely coupled distributed communication, where in this context the term 'communication' can be understood as an exchange of messages between software components. Message-oriented technologies attempt to relax tightly coupled communication by the introduction of an intermediary component. This approach allows software components to communicate with each other indirectly. Benefits of this include message senders not needing to have precise knowledge of their receivers.The advantages of messaging include the ability to integrate heterogeneous platforms, reduce system bottlenecks, increase scalability, and respond more quickly to change.
Version history
- JMS 1.0
- JMS 1.0.1
- JMS 1.0.1a
- JMS 1.0.2
- JMS 1.0.2a
- JMS 1.0.2b
- JMS 1.1
- JMS 2.0. It was maintained under the Java Community Process as JSR 343.
- JMS 2.0a
- Jakarta Messaging 2.0.2 is the first release under Eclipse Foundation and Jakarta EE
- Jakarta Messaging 3.0.0 is a part of Jakarta EE 9
- Jakarta Messaging 3.1.0 is a part of Jakarta EE 10
Elements
; JMS provider
; JMS client
; JMS producer/publisher
; JMS consumer/subscriber
; JMS message
; JMS queue
; JMS topic
Models
The JMS API supports two distinct models:- Point-to-point
- Publish-and-subscribe
Point-to-point model
Publish-and-subscribe model
The publish-and-subscribe model supports publishing messages to a particular message "topic". Subscribers may register interest in receiving messages published on a particular message topic. In this model, neither the publisher nor the subscriber knows about each other. A good analogy for this is an anonymous bulletin board.- Zero or more consumers will receive the message.
- There is a timing dependency between publishers and subscribers. The publisher has to create a message topic for clients to subscribe. The subscriber has to remain continuously active to receive messages, unless it has established a durable subscription. In that case, messages published while the subscriber is not connected will be redistributed whenever it reconnects.
URI scheme
RFC 6167 defines ajms: URI scheme for the Java Message Service.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
- Apache ActiveMQ Classic
- Apache ActiveMQ Artemis
- Apache Qpid, using AMQP
- IBM MQ
- IBM WebSphere Application Server's Service Integration Bus
- JBoss Messaging and HornetQ from JBoss
- JORAM from the OW2 Consortium
- Open Message Queue from Eclipse Foundation
- OpenJMS from the OpenJMS Group
- Oracle WebLogic Server and Oracle AQ
- PubSub+ from Solace
- RabbitMQ from Pivotal Software
- TIBCO Enterprise Message Service