Jump to content

Jakarta Messaging

From Alfawiki
Jakarta Messaging (formerly Java Message Service)
Company typeApplication programming interface
IndustrySoftware, Middleware
PredecessorJava Message Service (JMS) API
FounderSun Microsystems
Area served
Worldwide
ProductsMessaging API for Java applications
OwnerJakarta EE (Eclipse Foundation)
ParentJakarta EE
Websitejakarta.ee/specifications/messaging/

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:

See also

External links