Fact-checked by Grok 2 weeks ago

Jakarta Messaging

Jakarta Messaging is a Java application programming interface (API) specification within the Jakarta EE platform that enables applications to create, send, receive, and read messages using message-oriented middleware (MOM) for reliable, asynchronous, and loosely coupled communication. Originally developed as the Java Message Service (JMS) under Java EE, Jakarta Messaging emerged as part of the transition of Java EE technologies to the Eclipse Foundation in 2017, with the project rebranded under the Jakarta EE umbrella to reflect open governance and community-driven evolution. The specification defines a portable set of interfaces and semantics that abstract the underlying messaging provider, allowing developers to build distributed systems without tight coupling between producers and consumers of messages. Key components of Jakarta Messaging include , which establish virtual links to a messaging provider; sessions, which provide a single-threaded context for producing and consuming messages; messages, structured objects containing headers, properties, and a body for data transfer; and destinations, such as queues for point-to-point (PTP) messaging or topics for publish/subscribe (pub/sub) models. It supports two primary messaging domains: PTP, where messages are delivered to a single consumer from a queue, and pub/sub, where messages are broadcast to multiple subscribers via topics, ensuring once-only delivery guarantees and transactional integrity. Providers, such as or , implement these interfaces to handle the actual transport and persistence of messages. The API integrates seamlessly with other Jakarta EE components, including message-driven beans (MDBs) for container-managed asynchronous processing and resource adapters for accessing external messaging systems. Notable features include configurable acknowledgment modes (e.g., AUTO_ACKNOWLEDGE for automatic handling), support for both client and container-managed transactions, and mechanisms for delayed or shared subscriptions to enhance scalability in enterprise environments. As of its latest release, Jakarta Messaging 3.1.0 (March 15, 2022), the specification has matured through versions aligned with 8, 9, 10, and 11, emphasizing portability, reliability, and compatibility with modern features like modules and records. It remains a foundational technology for building resilient, event-driven applications in distributed systems, widely adopted in industries for tasks ranging from communication to integration.

Introduction

Definition and Purpose

Jakarta Messaging is a set of standard Java interfaces and associated semantics that define how Java programs create, send, receive, and read messages within messaging systems. It provides a common for , enabling applications to interact with various messaging providers in a portable manner. The primary purpose of Jakarta Messaging is to facilitate loosely coupled, asynchronous communication between distributed Java components, which promotes and in enterprise environments. By senders and receivers, it allows systems to handle varying loads without direct dependencies, buffering messages to manage peak demands effectively. Additionally, it integrates seamlessly with other technologies, such as transactions and enterprise beans, to support reliable orchestration. Jakarta Messaging evolved from the original Java Message Service () specification, transitioning to the Jakarta namespace as part of the broader shift of Java EE to the in 2017. This change reflects ongoing efforts to modernize the API for contemporary enterprise needs while maintaining backward compatibility with implementations.

Development History

The Message Service () specification was initially released as version 1.0 in 1998 by as part of the emerging Java EE platform, providing a standardized for messaging in Java applications. This initial version laid the foundation for asynchronous communication between distributed components. Subsequent patch releases addressed clarifications and minor issues, including JMS 1.0.1 in October 1998, JMS 1.0.2 in December 1999, and JMS 1.0.2b in August 2001, ensuring compatibility and refining implementation details without introducing major new features. A significant evolution occurred with 1.1 in March 2002, which introduced domain-independent APIs to unify point-to-point and publish-subscribe models under a common interface. This update, developed under JSR 914, enhanced portability and simplified development for enterprise applications. The specification then saw a decade of stability until 2.0 was released in May 2013 as part of Java EE 7, adding capabilities such as shared durable subscriptions for load balancing across consumers, support for shared subscriptions, and simplified resource injection using annotations like @Resource. In November 2017, Oracle announced the transfer of Java EE stewardship to the to foster open community-driven development, with the process completing by 2019 alongside the release of 8, which retained the javax.* namespace for . This rebranding marked the shift to , culminating in Jakarta Messaging 3.0 in November 2020 for 9, which mandated the jakarta.jms namespace and required providers to support both messaging domains natively. Jakarta Messaging 3.1 followed in March 2022 for 10, incorporating minor clarifications and compatibility updates. As of November 2025, 3.1 is included in 11 (released June 2025) and remains under active development by the Foundation's Working Group, with ongoing enhancements for alignment with modern platforms like while maintaining compatibility with prior releases.

Fundamental Components

Messages

In , messages represent the core units of data exchange, encapsulating information for asynchronous communication between distributed applications. Each message adheres to a standardized structure defined by the jakarta.jms.Message interface, which serves as the root for all message types and ensures portability across compliant providers. This interface specifies the message header, properties, and body, enabling consistent handling of metadata and payload while supporting various data formats. The anatomy of a Jakarta Messaging message includes a required header, optional properties, and an optional body. The header consists of predefined fields that facilitate , , and ; these fields are typically set by the messaging provider or the sending application. Standard header fields are outlined in the following table:
Field NameTypeDescriptionSet By
JMSDestinationDestinationThe queue or topic to which the is sent.Jakarta Messaging provider send
JMSMessageIDA assigned to the .Jakarta Messaging provider send
JMSTimestamplongThe time at which the was handed off to the provider for .Jakarta Messaging provider send
JMSCorrelationIDString or byte[]A value linking this to another (e.g., for request-reply patterns).Client
JMSReplyToDestinationThe destination for a response .Client
JMSDeliveryModeintIndicates persistent (2) or non-persistent (1) .Jakarta Messaging provider send
JMSRedeliveredTrue if the is being redelivered.Jakarta Messaging provider prior to
JMSTypeA type identifier for filtering or .Client
JMSExpirationlongExpiration time (milliseconds since ), 0 for no expiration.Jakarta Messaging provider send
JMSPriorityint priority from 0 (lowest) to 9 (highest), default 4.Jakarta Messaging provider send
JMSDeliveryTimelongScheduled time (milliseconds since ), 0 for immediate.Jakarta Messaging provider send
These fields can be accessed and, where applicable, modified via getter and setter methods on the Message interface before sending. Properties provide a flexible mechanism for attaching application-defined or provider-specific metadata to messages as name-value pairs. Supported property types include Java primitives (boolean, byte, short, int, long, float, double) and String, with corresponding setter methods (e.g., setBooleanProperty(String name, boolean value)) ensuring type safety. Properties prefixed with "JMSX" denote standard properties defined by the specification, such as JMSXDeliveryCount (an integer tracking redelivery attempts, set by the provider), while application properties use arbitrary names and vendor-specific ones may use "JMS_" prefixes. Properties are settable prior to sending but become read-only upon receipt; to modify them post-receipt, the clearProperties() method must be invoked first. Properties cannot reference or access the message body content. The message body carries the actual payload and is formatted according to one of several subtypes extending the Message interface, each tailored to specific data needs:
  • TextMessage: Holds a single , commonly used for text-based payloads like XML or .
  • BytesMessage: Contains a stream of uninterpreted bytes, suitable for .
  • StreamMessage: Stores a sequence of Java values (e.g., int, double) in a write-once, read-many format.
  • MapMessage: Encapsulates a set of name-value pairs with keys and or values, akin to a portable hash map.
  • ObjectMessage: Transports a single serializable Java object.
  • : The base type with no body, relying solely on headers and properties.
These subtypes enforce body-specific read/write behaviors, such as preserving byte order in BytesMessage or maintaining type fidelity in StreamMessage. Message selectors enable consumers to filter incoming messages based on header fields and properties using SQL92-like conditional expressions, without accessing the body. Selectors are specified as strings during session or consumer creation and support literals (numeric, string, boolean), comparison operators (=, >, <, etc.), logical operators (AND, OR, NOT), and functions like BETWEEN, IN, LIKE, and IS NULL; identifiers are case-sensitive. For example, a selector like JMSType = 'order' AND priority > 5 AND color LIKE 'red%' would match messages of type "order" with priority above 5 and a "color" property starting with "red". Only valid property types are evaluable, and selectors are evaluated by the provider for efficiency.

Destinations

In Jakarta Messaging, destinations serve as the primary endpoints for message routing and consumption, abstracting the underlying provider-specific addressing mechanisms. The jakarta.jms.Destination interface defines a runtime that encapsulates a provider-specific address, enabling applications to send messages to a target and receive them from a source without direct exposure to implementation details. This is portable across different messaging providers, allowing concurrent use by multiple threads and hiding administrative configuration behind a standardized object. Queues represent destinations tailored for the point-to-point messaging paradigm, functioning as a temporary holding area where messages await by a single receiver. A jakarta.jms.Queue object wraps a provider-specific queue name, ensuring that each is delivered to exactly one consumer in a load-balanced manner, with retention until explicit or expiration occurs. This design supports reliable, ordered delivery scenarios, such as task distribution in systems. In contrast, topics facilitate the publish-subscribe model by enabling one-to-many message distribution to multiple subscribers. The jakarta.jms.Topic interface, which extends Destination, encapsulates a provider-specific topic name and supports hierarchical structures for flexible subscription patterns, allowing messages to be broadcast instantaneously to all active subscribers without persistent storage beyond delivery. Topics are ideal for event notification and decoupled communication, where publishers remain unaware of the number or identity of consumers. Destinations are typically administered objects, meaning they are pre-configured by system administrators using provider tools or deployment descriptors and stored in a JNDI for lookup by client applications. This approach ensures centralized management of details, such as capacity limits and security settings, while allowing injection via annotations like @Resource in Jakarta EE environments. Administered destinations promote portability and ease of maintenance in distributed systems. For scenarios requiring ephemeral communication, temporary destinations provide dynamically created queues or topics with lifetimes bound to the creating . These are generated via methods like JMSContext.createTemporaryQueue() or createTemporaryTopic(), accessible only to consumers on the same , and automatically deleted upon closure, making them suitable for patterns like request-reply without persistent resource overhead.

Connections and Sessions

In Jakarta Messaging, the ConnectionFactory serves as the primary administered object for creating connections to a messaging provider. It encapsulates configuration parameters such as authentication credentials and connection pooling options, and can be obtained via Java Naming and Directory Interface (JNDI) lookups or through direct instantiation in non-Jakarta EE environments. Specific subtypes include QueueConnectionFactory for point-to-point messaging and TopicConnectionFactory for publish-subscribe scenarios, enabling tailored connection creation methods like createConnection() or createQueueConnection(). A object represents an active communication link between the client application and the messaging provider, typically implemented as a TCP/IP socket or similar transport. Upon creation via a ConnectionFactory, the connection starts in a stopped state, requiring an explicit call to start() to begin message flow to associated consumers; conversely, stop() suspends delivery without closing the connection. Connections also support setting a unique clientID via setClientID(), which is essential for enabling durable subscriptions in publish-subscribe models, though this method is restricted in Jakarta EE containers to prevent conflicts. Additionally, connections can register an ExceptionListener to handle provider-specific errors asynchronously. The Session interface provides a single-threaded context for producing and consuming messages within a connection, ensuring thread safety by prohibiting concurrent use across multiple threads. Created through methods like createSession(boolean transacted, int acknowledgeMode) on the connection, sessions operate in either transacted mode—for atomic message groups managed by commit() and rollback()—or non-transacted mode, where acknowledgment modes such as AUTO_ACKNOWLEDGE or CLIENT_ACKNOWLEDGE handle delivery guarantees. Sessions are responsible for instantiating MessageProducer, MessageConsumer, and Message objects, serving as the factory for these core messaging components. In the simplified API introduced in Jakarta Messaging 2.0 and refined in 3.0, sessions are implicitly managed within a JMSContext for streamlined usage. MessageProducer is the interface for sending messages to a specified destination, such as a queue or topic, and is obtained via session.createProducer(Destination destination). It supports both synchronous sends using send() methods and asynchronous delivery, with options to disable message IDs or timestamps for performance optimization. Similarly, MessageConsumer facilitates message receipt from a destination, created via session.createConsumer(Destination destination), and offers synchronous reception through receive() or asynchronous handling by setting a MessageListener with setMessageListener(). Both producers and consumers are tightly bound to their destinations at creation, promoting a destination-centric messaging model. Jakarta Messaging 3.0 marked a significant evolution in the namespace, transitioning from the javax.jms package used in prior versions to jakarta.jms to align with the Eclipse Foundation's governance of the platform. This change necessitates code updates, such as replacing import statements and fully qualified class names, to ensure compatibility with 9 and later environments, though layers may be provided by implementations.

Messaging Paradigms

Point-to-Point Model

The point-to-point (PTP) model in Jakarta Messaging facilitates message delivery, where messages are sent to a specific and consumed by exactly one , enabling load balancing across multiple active consumers on the same . This model uses as destinations, which store messages until they are successfully processed, supporting both synchronous and asynchronous consumption to decouple producers from consumers. encapsulate provider-specific addressing details and can handle concurrent access, though their capacity and overflow behavior are implementation-dependent rather than specified. In the PTP domain, the legacy domain-specific interfaces QueueSender and QueueReceiver provide targeted operations for sending and receiving messages, respectively; these were primary in pre-2.0 versions but are now selectable via the unified Destination interface in Jakarta Messaging 3.0. A QueueSender, created from a QueueSession, directs messages to a designated queue, while a QueueReceiver, also from a QueueSession, retrieves them and supports message selectors for filtering based on header or property values. This approach allows for precise control in queue-based interactions, with the unified introduced in JMS 2.0 (and retained in Jakarta Messaging 3.0) enabling code portability across PTP and publish-subscribe paradigms without domain-specific dependencies. Common use cases for the PTP model include request-reply patterns, where a sends a request to a and awaits a response from a single , and work queues for distributing tasks among worker processes to achieve load balancing. For instance, in order processing systems, messages representing customer orders are queued for exclusive handling by one fulfillment service, ensuring no duplication. Consumer behavior in the PTP model emphasizes exclusive delivery: messages are retained in the queue until acknowledged by the consuming session or until they expire, with delivery load-balanced to one of multiple active consumers to optimize throughput. Asynchronous consumption via a MessageListener allows non-blocking , where the listener method is invoked upon message arrival, while synchronous receive methods block until a message is available or a timeout occurs. If acknowledgment fails, the message may be redelivered, promoting reliability without specifying exact retry mechanisms, which are provider-specific. Unlike JMS 1.x, where PTP implementation was optional alongside the domain-specific APIs, Jakarta Messaging 3.0 mandates support for the PTP model in conjunction with publish-subscribe, building on the unified API from JMS 2.0 while updating namespaces to jakarta.* for compatibility with modern Java EE ecosystems. This evolution ensures that PTP functionality remains a core, required feature without altering the fundamental queue semantics from earlier versions.

Publish-Subscribe Model

The publish-subscribe (pub/sub) model in Jakarta Messaging enables asynchronous communication where publishers send messages to a topic, and those messages are distributed to multiple active subscribers registered to that topic. This one-to-many distribution supports decoupled interactions in distributed systems, with topics serving as administered objects that encapsulate provider-specific destinations for message routing. Unlike point-to-point messaging, pub/sub allows each message to be consumed by any number of subscribers, or none if no subscribers are active, and topics typically retain messages only until they are delivered to current subscribers. Publishers use a TopicPublisher interface, created from a TopicSession, to send messages to a specific topic, while subscribers employ a TopicSubscriber or the unified MessageConsumer interface to receive messages from their subscription. In the unified domain introduced in Jakarta Messaging 2.0, these domain-specific interfaces are optional, allowing a single set of APIs for both point-to-point and pub/sub paradigms. Subscriptions can be non-shared, where each has a single active consumer, or shared, where multiple consumers can attach to the same subscription, with each message delivered to only one of them for load balancing. Durable subscriptions enhance reliability by allowing subscribers to receive messages published while they are offline or inactive, with messages retained for later delivery. These are created using methods like createDurableSubscriber or createDurableConsumer, identified by a unique subscription name and, for non-shared cases, a client ID set on the connection. Only one active consumer can be associated with a non-shared durable subscription at a time, ensuring ordered delivery upon reconnection. This model is particularly suited for use cases involving event notifications, such as stock price updates or system alerts, and broadcast updates in distributed applications like content distribution to a sales force. Jakarta Messaging 2.0 introduced shared durable subscriptions, allowing multiple consumers to share a durable topic subscription for improved scalability in high-throughput scenarios, with the client ID becoming optional for such configurations. These enhancements, carried forward in version 3.0, mandate full pub/sub support across providers, facilitating more flexible and concurrent message consumption.

Advanced Features

Reliability and Delivery

Jakarta Messaging defines two primary delivery modes to balance reliability and performance: PERSISTENT and NON_PERSISTENT. In PERSISTENT mode, messages are logged to stable storage by the provider, ensuring once-and-only-once delivery semantics even in the event of provider failure, though this incurs higher latency and resource usage. Conversely, NON_PERSISTENT mode provides at-most-once delivery without stable storage, allowing for faster transmission but risking message loss if the provider fails before delivery. The delivery mode is set by the message producer and applies as a default unless overridden per message; if unspecified, the default is PERSISTENT. Acknowledgment modes control how consumers confirm receipt of messages, influencing reliability and potential duplicates. AUTO_ACKNOWLEDGE mode automatically acknowledges messages upon successful return from the receive or message listener callback, simplifying client code but offering no explicit . CLIENT_ACKNOWLEDGE requires manual invocation of the message's acknowledge() method, providing finer-grained where acknowledging one message implicitly confirms all prior messages in the session. DUPS_OK_ACKNOWLEDGE permits lazy acknowledgments, allowing occasional duplicates for improved in high-throughput scenarios. SESSION_TRANSACTED ties acknowledgments to boundaries, ensuring atomicity but deferring details to transactional contexts. These modes are configured at the session level. Redelivery mechanisms handle failed deliveries by retaining unacknowledged messages for subsequent attempts. If a consumer fails to acknowledge a message—due to exceptions, session closure, or explicit non-acknowledgment—the provider marks it for redelivery, setting the JMSRedelivered header to true and incrementing the JMSXDeliveryCount property to track attempts. This process applies across acknowledgment modes, with unacknowledged messages in CLIENT_ACKNOWLEDGE or AUTO_ACKNOWLEDGE triggering redelivery of prior messages in the session. While the specification mandates redelivery for unacknowledged messages, specifics like maximum attempts or exponential backoff intervals are implementation-dependent to avoid indefinite retries. Message ordering is preserved within the scope of a session to maintain sequence integrity. In the point-to-point (PTP) model using queues, messages sent to a destination are delivered in the order of dispatch to a single consumer, ensuring behavior for that session. However, the publish-subscribe (pub/sub) model with topics does not guarantee global ordering, as messages to multiple subscribers independently, potentially resulting in varied reception sequences across consumers. Ordering can be influenced by factors like or delay but remains session-bound rather than system-wide. Introduced in Jakarta Messaging 3.0, delayed message delivery enables producers to schedule messages for future availability. Producers specify a delivery delay in milliseconds via setDeliveryDelay(), preventing the message from being dispatched until the interval elapses from the send time. This feature supports time-sensitive workflows, such as deferred notifications, without requiring external scheduling; if unspecified, the delay defaults to zero for immediate delivery. The delay applies per message or as a producer default and integrates with existing delivery modes.

Transactions

Jakarta Messaging supports transactions to group message production and consumption operations into , ensuring that either all operations in a transaction succeed or none are applied. This is achieved through transacted sessions, which are created by invoking the createSession(true, Session.AUTO_ACKNOWLEDGE) method on a connection, where the first boolean parameter enables transacted mode. In such sessions, the commit() method finalizes the current by sending produced messages and acknowledging received ones, while rollback() undoes the operations by discarding produced messages and redelivering consumed ones to make them available again. Each transacted session maintains a single ongoing series of transactions, with a new one starting automatically after each commit or rollback. Local transactions in Jakarta Messaging are confined to a single session and do not involve a , making them suitable for standalone Java SE applications where the application directly manages the lifecycle using commit() and rollback(). These s ensure atomicity for multiple sends and receives within the session, but all operations must occur on the same session to be grouped together. In Jakarta EE environments, local methods are typically ignored if a container-managed is active, or they may throw a TransactionInProgressException to prevent conflicts with management. For distributed transactions spanning multiple resources, Jakarta Messaging integrates with the Jakarta Transactions API (JTA) through XA support, which is optional and implemented via XAConnectionFactory, XASession, and the XAResource interface. This allows a transaction manager to coordinate two-phase commits across messaging resources and other participants, such as databases, enabling atomic operations in enterprise applications. However, XA functionality is not required for all providers, limiting portability in some implementations. In transacted mode, message delivery semantics are tightly coupled to transaction boundaries: produced messages are not visible to consumers until the transaction commits, and rolled-back transactions trigger redelivery of previously consumed messages as if they had never been received. Delivery delay and time-to-live properties are evaluated at the time of sending, unaffected by subsequent commits. Transactions in Jakarta Messaging have several limitations, including the single-threaded nature of sessions, which prohibits concurrent access to the same transaction, and restrictions on asynchronous message sends in certain containers like web or EJB components. Local transactions and client acknowledgments are not permitted when container-managed transactions are active, and temporary queues must be consumed using the same connection that created them. Additionally, durable subscriptions in publish-subscribe domains are not directly encompassed in transactions for operations like creation or unsubscription, though message sends and receives can participate. Jakarta Messaging 2.0 introduced enhancements for JTA integration, including support for simplified APIs like JMSContext that align better with container-managed transactions, improving usability in distributed environments without altering the core XA model.

Configuration and Administration

Connection Factories and JNDI

In Jakarta Messaging, connection factories serve as administered objects that encapsulate configuration parameters necessary for clients to establish connections with a messaging provider. These objects are created and configured by administrators using provider-specific tools and are essential for initializing connections in both point-to-point and publish-subscribe domains. Prior to , Jakarta Messaging (formerly ) relied on domain-specific connection factory types: QueueConnectionFactory for point-to-point messaging, which creates QueueConnection objects, and TopicConnectionFactory for publish-subscribe messaging, which creates TopicConnection objects. With the unification of domains introduced in and carried forward in subsequent releases, including Jakarta Messaging 3.1, the generic ConnectionFactory interface supports both domains, allowing providers to implement a single factory type that can create connections for queues or topics as needed. The domain-specific factories remain available for backward compatibility, ensuring seamless migration from earlier implementations. Connection factories are configured with properties such as the provider's server URL or host, authentication credentials (username and password), client ID for durable subscriptions, and reliability-related defaults like delivery mode (persistent or non-persistent) and acknowledgment modes. These parameters are set administratively and embedded within the factory object, allowing clients to create connections without hardcoding provider details; for instance, the createConnection(String userName, String password) method can override credentials at runtime if needed. Reliability settings in the factory often include defaults for message persistence to ensure once-and-only-once delivery semantics when combined with appropriate session configurations. Integration with the Java Naming and Directory Interface (JNDI) enables the binding of connection factories and destinations as administered objects within a naming , promoting in enterprise environments. Administrators bind these objects to JNDI names, such as "jms/ConnectionFactory," using provider tools, after which clients obtain an InitialContext and perform lookups via context.lookup("jndiName") to retrieve the factory without knowledge of underlying provider specifics. Administered objects must implement the Referenceable interface to support serialization and portability across different JNDI providers. For scenarios involving distributed transactions, XA variants of connection factories provide support for the X/Open XA standard, enabling coordination with the Jakarta Transactions (JTA) API. Examples include XAQueueConnectionFactory for point-to-point domains, which creates XAQueueConnection objects, and XATopicConnectionFactory for publish-subscribe, both extending the base XAConnectionFactory to produce XASession instances that participate in global transactions managed by a transaction manager. These XA factories are also bound as administered objects in JNDI, allowing applications in Jakarta EE containers to enlist them transparently in two-phase commit protocols. The use of JNDI with connection factories enhances portability by decoupling application code from vendor-specific implementations, as clients interact solely with standard interfaces regardless of the underlying messaging provider. This abstraction layer ensures that switching providers requires only reconfiguration of administered objects in the naming service, without altering client logic.

URI Scheme

RFC 6167 defines the jms: URI scheme to provide a standardized way to identify message destinations, such as queues and topics, promoting across different messaging providers. This scheme enables applications to reference destinations in a uniform format, independent of provider-specific addressing details. Defined for JMS 1.0, the URI format supports dynamic resolution of destinations through API calls and configuration, with enhanced support for URI-like strings in destination creation methods starting from JMS and carried forward into Jakarta Messaging. The basic syntax follows the form jms:<scheme-specific-part>, where the scheme-specific part varies based on the destination type. For point-to-point queues, the variant is jms:queue://<name>, and for publish-subscribe topics, it is jms:topic://<name>. The components include the fixed "jms" scheme, an optional authority section specifying host and port (e.g., for remote resolution), a path segment denoting the destination name, and optional query parameters for additional attributes like message selectors or properties. For example, a simple queue reference might be jms:queue:orders, while a topic with a selector could be jms:topic:news?selector='priority>5'. These URIs are used in several contexts within Jakarta Messaging applications. In API methods, such as Session.createQueue(String) or Session.createTopic(String), the argument can accept a jms: URI string to dynamically create a Queue or Topic object representing the destination. They also appear in JNDI lookups via variants like jms:jndi:<jndi-name>?jndiURL=<context>, allowing resolution through naming services, and in configuration files for declarative setup of messaging resources. This standardization facilitated queue and topic resolution without relying solely on provider-specific strings. Interpretation of such URIs is provider-dependent, as the specification does not mandate a standard format beyond allowing provider-specific strings. Jakarta Messaging 3.1 uses the jakarta.jms package namespace for compatibility with the platform while preserving support for existing URI usage in provider implementations. Query parameters support features like message selectors for filtering, as in the example jms:queue:orders?selector='status=pending', enabling fine-grained control over message routing without altering the base destination.

Implementations

Open-Source Providers

Several open-source implementations provide support for the Jakarta Messaging specification, enabling developers to integrate messaging capabilities into Java applications without dependencies. These providers vary in their , from standalone brokers to embedded options within application servers, and emphasize standards compliance for interoperability. is a widely adopted multi-protocol that offers full support for Jakarta Messaging 3.1, 2.0, and 1.1, including client and server implementations with JNDI integration. It features compatibility over protocols like STOMP and WebSockets, making it suitable for diverse environments. ActiveMQ Classic serves as the core broker, with Apache ActiveMQ Artemis as its next-generation implementation, which provides enhanced performance and Jakarta Messaging semantics via a facade on its core . Apache Qpid focuses on AMQP 1.0 as its underlying protocol, delivering a complete Jakarta Messaging 3.1 client through Qpid JMS, which supports interoperability with non-JMS clients across languages and platforms. This design promotes cross-protocol messaging while maintaining full compliance with Jakarta Messaging 3.0 and later versions. Jakarta EE-compatible application servers like Eclipse GlassFish and Open Liberty offer embedded Jakarta Messaging support, implementing the specification directly within the server runtime for seamless integration in enterprise applications. Eclipse GlassFish, as a compatible implementation, maps resources like the default JMS connection factory to support Jakarta Messaging operations. Open Liberty provides features such as messaging-3.1 for resource adapters and an embedded messagingServer-3.0 compliant broker, allowing applications to send and receive messages without external dependencies. HornetQ, now a legacy project succeeded by , was an early supporter of and provided foundational open-source messaging capabilities, particularly in JBoss environments, before its code was integrated into for continued development. These open-source providers generally require explicit configuration for features like message persistence and clustering to achieve production-grade reliability, with standing out as the most commonly used for standalone broker deployments due to its maturity and broad protocol support.

Commercial Providers

, developed by , provides support for Jakarta Messaging 3.0 through its dedicated classes for Jakarta Messaging, enabling developers to build applications that leverage the specification's features on top of IBM's robust messaging infrastructure. This implementation includes advanced clustering capabilities, where multiple queue managers can form a logical group to distribute workload and ensure message availability across nodes, alongside configurations such as multi-instance queue managers that automatically without data loss. Furthermore, integrates seamlessly with mainframe environments like , allowing mainframe applications to exchange messages with distributed systems while maintaining enterprise-grade security and performance. Oracle Advanced Queueing (AQ), embedded within the , serves as a JMS provider that supports messaging operations integrated with database transactions and storage. It accommodates XML and payloads for structured data exchange, facilitating scenarios where messages contain complex, schema-based content directly managed by the database. AQ benefits from Oracle Real Application Clusters (RAC) for clustering, enabling and scalability across multiple database instances to handle large-scale messaging workloads without single points of failure. TIBCO achieves full compliance with Jakarta Messaging 3.0, passing the Eclipse Foundation's (TCK) tests to ensure with other standards-based applications. It offers fault-tolerant bridging between servers, allowing seamless in paired configurations to maintain continuous message flow, and load balancing across multiple instances to optimize resource utilization, particularly in high-volume environments like where low-latency is critical. Solace PubSub+ delivers hybrid support for Jakarta Messaging up to version 3.1 alongside protocols like AMQP, providing a unified API for diverse messaging needs through its sol-jms-jakarta library. The platform excels in publish-subscribe scalability, supporting massive topic hierarchies and dynamic subscriptions to handle event-driven architectures at scale, while integrating event streaming capabilities for real-time data distribution across hybrid cloud environments. Commercial providers of Jakarta Messaging implementations typically offer enterprise-grade vendor support, including service level agreements (SLAs) for uptime and response times, specialized monitoring tools for performance analytics and alerting, and proprietary extensions such as enhanced guaranteed messaging to exceed specification requirements for durability and exactly-once delivery semantics. These features ensure reliable operation in mission-critical deployments, often with dedicated support teams for integration and troubleshooting.

References

  1. [1]
    Jakarta Messaging | Jakarta EE | The Eclipse Foundation
    Jakarta Messaging describes a means for Java applications to create, send, and receive messages via loosely coupled, reliable asynchronous communication ...Jakarta Messaging 3.0Jakarta Messaging 2.0
  2. [2]
    Jakarta Messaging | projects.eclipse.org
    Jakarta Messaging is a Java Message Oriented Middleware API for sending messages between two or more clients. It is a programming model to handle the producer- ...
  3. [3]
    Jakarta Messaging Concepts
    Jakarta Messaging is a Java API that allows applications to create, send, receive, and read messages. Jakarta Messaging defines a common set of interfaces and ...
  4. [4]
    The JMS and Jakarta Messaging model - IBM
    The JMS and Jakarta Messaging model defines a set of interfaces that Java applications can use to perform messaging operations.
  5. [5]
    Jakarta Messaging 3.0 :: Open Liberty Docs
    This feature enables the configuration of resource adapters to access messaging systems by using the Jakarta Messaging API. This feature also enables the ...
  6. [6]
    Jakarta Messaging 3.1.0 | projects.eclipse.org
    Mar 15, 2022 · JPMS module information. Release Date. Tuesday, March 15, 2022 - 12:00. Release Type. Minor release.
  7. [7]
    Using JMS or Jakarta Messaging - ActiveMQ
    In this section we'll go through the main steps in configuring the server for JMS and creating a simple JMS program.
  8. [8]
    Jakarta Messaging
    Oct 22, 2020 · Jakarta Messaging provides a common way for Java programs to create, send, receive and read an enterprise messaging system's messages.
  9. [9]
    jms-spec - Java EE
    The Java Message Service (JMS) specification was first released in 1998, at the dawn of Java EE, with a major update in 2002. It then remained unchanged during ...Missing: history | Show results with:history
  10. [10]
    [PDF] JMS Specification
    Apr 3, 2011 · Java™ Message Service Specification ("Specification"). Version: 1.0.2. Status: Final Release. Release: 12/17/99. Copyright 1999 Sun Microsystems ...Missing: timeline | Show results with:timeline
  11. [11]
    The Java Community Process(SM) Program - detail JSR# 914
    JSR 914: Java TM Message Service (JMS) API Status: Final JCP version in use: 2.1 Java Specification Participation Agreement version in use: 1.0
  12. [12]
    JMS 2.0 Final Release - Java EE
    JMS 2.0 was finally released on 21 May 2013. The specification document and API documentation of the JMS 2.0 final release may be downloaded from the JCP ...Missing: timeline | Show results with:timeline
  13. [13]
    Java Specification Requests - detail JSR# 343
    Mar 15, 2011 · The Java Message Service (JMS) API is designed for both Java EE and Java SE platform environments. It is expected that JMS 2.0 will be included ...
  14. [14]
    Jakarta EE 8: Past, Present, and Future | The Eclipse Foundation
    Java EE 8 was released with a much-reduced scope, and Oracle announced in late 2017 that they would be transferring Java EE to the Eclipse Foundation.
  15. [15]
    Jakarta Messaging 3.0.0 | projects.eclipse.org
    Nov 11, 2020 · New package namespace jakarta.jms plus non-API changes in TCKs and spec document. Release Date. Wednesday, November 11, 2020 - 12:00.Missing: history | Show results with:history
  16. [16]
    [PDF] Jakarta Messaging
    Specification: Jakarta Messaging. Version: 3.1. Status: Final Release. Release: February 25, 2022. Preface. Final Release. Jakarta Messaging 1. Page 12 ...
  17. [17]
    Jakarta EE Platform 11 | Jakarta EE | The Eclipse Foundation
    Release of the Jakarta EE 11 Platform. The Jakarta EE Platform defines a standard platform for hosting Jakarta EE applications.
  18. [18]
    Jakarta Messaging
    Summary of each segment:
  19. [19]
    Interface Message - Jakarta® EE
    The Message interface is the root interface of all Jakarta Messaging messages. It defines the message header and the acknowledge method used for all messages.
  20. [20]
  21. [21]
  22. [22]
  23. [23]
  24. [24]
  25. [25]
  26. [26]
    Messaging Concepts - ActiveMQ
    2.1. Point-to-Point ... With this type of messaging you send a message to a queue. The message is then typically persisted to provide a guarantee of delivery, ...
  27. [27]
    [PDF] Jakarta Messaging
    Oct 23, 2020 · The Jakarta Messaging 2.0 specification now requires Jakarta Messaging providers to implement both. PTP and pub/sub. The following new ...
  28. [28]
  29. [29]
    Session (Java(TM) EE 7 Specification APIs) - Oracle Help Center
    Each transacted session supports a single series of transactions. Each ... The JMS provider retains a record of this durable subscription and ensures ...
  30. [30]
    [PDF] Jakarta Messaging
    Jakarta Messaging describes a means for Java applications to create, send, and receive messages via loosely coupled, reliable asynchronous communication ...
  31. [31]
  32. [32]
    jakarta.jms (Jakarta Messaging API documentation)
    ### Summary of jakarta.jms Package (Jakarta Messaging API v3.0.0)
  33. [33]
  34. [34]
  35. [35]
  36. [36]
  37. [37]
  38. [38]
    ConnectionFactory (Jakarta Messaging API documentation)
    A ConnectionFactory encapsulates connection parameters defined by an administrator, used by clients to create a connection with a Jakarta Messaging provider.Missing: JakartaConnectionFactory | Show results with:JakartaConnectionFactory
  39. [39]
  40. [40]
  41. [41]
  42. [42]
  43. [43]
    XAConnectionFactory (Jakarta Messaging API documentation)
    Some application servers provide support for grouping JTA capable resource use into a distributed transaction (optional). To include Jakarta Messaging API ...
  44. [44]
  45. [45]
  46. [46]
    RFC 6167 - URI Scheme for Java(tm) Message Service 1.0
    Oct 14, 2015 · This document defines the format of Uniform Resource Identifiers (URIs) as defined in RFC 3986, for designating connections and destination addresses used in ...Missing: Jakarta | Show results with:Jakarta
  47. [47]
    Using the IBM JMS extensions
    WMQConstants (Jakarta Messaging 3.0) contains the definitions of constants that an application can use when setting the properties of IBM MQ classes for JMS or ...
  48. [48]
    Jakarta Messaging 3.0 | Jakarta EE | The Eclipse Foundation
    Jakarta Messaging 3.0. Release for Jakarta EE 9. Jakarta Messaging describes a means for Java applications to create, send, and receive messages via loosely ...Missing: history | Show results with:history
  49. [49]
    ActiveMQ - The Apache Software Foundation
    Partial Jakarta Messaging 3.1 & JMS 2.0 support and full JMS 1.1 support + full client implementation including JNDI · High availability using shared storage ...JMS 2.0 page · Getting Started Guide · Download ActiveMQ Classic · News
  50. [50]
    ActiveMQ Classic Jakarta Messaging 3.1 & JMS 2.0 Support
    This work commenced in late 2019 via AMQ-7309. If you need full support for Jakarta Messaging 3.1 or JMS 2.0 we recommend ActiveMQ Artemis. Transition Approach.
  51. [51]
    Chapter 2. The Integrated ActiveMQ Artemis Messaging Broker
    ActiveMQ Artemis also provides a Jakarta Messaging client API which uses a facade layer to implement the Jakarta Messaging semantics on top of the core API.
  52. [52]
    Qpid JMS - Apache Qpid™
    Qpid JMS is an AMQP 1.0 Jakarta Messaging 3.1 client built using Qpid Proton. For a release using Jakarta Messaging 3.1 (jakarta.jms), see the 2.9.0 release.
  53. [53]
    Qpid JMS 2.0.0 Release Notes - Apache Qpid™
    Qpid JMS is a complete Jakarta Messaging 3.0 client built using the Qpid Proton protocol engine. For more information about this release, including download ...
  54. [54]
    Jakarta EE Compatibility - Eclipse GlassFish
    Eclipse GlassFish is a Compatible Implementation of a number of Jakarta EE Specifications. For each specification we are required by the Eclipse Foundation ...
  55. [55]
    Jakarta Messaging Examples :: Jakarta EE Tutorial
    This example uses the following Jakarta Messaging administered objects: A connection factory. Two destination resources: a topic and a queue. Before you run ...
  56. [56]
    Jakarta Messaging 3.1 :: Open Liberty Docs
    This feature enables the configuration of resource adapters to access messaging systems by using the Jakarta Messaging API.
  57. [57]
    Messaging Server 3.0 :: Open Liberty Docs
    This feature enables an embedded messaging server that is Jakarta Messaging compliant. Applications can send and receive messages by using the messagingClient- ...
  58. [58]
    Chapter 32. Backward and Forward Compatibility | 7.4
    Forward compatibility: Legacy Jakarta Messaging clients using HornetQ can connect to a JBoss EAP 7 server running ActiveMQ Artemis. Backward compatibility: ...
  59. [59]
    Implementation components used by Jakarta EE servers
    May 4, 2020 · This however used to be Red Hat's own component, HornetQ, which it donated to Apache in order to merge the existing ActiveMQ and HornetQ ...
  60. [60]
    IBM MQ classes for Jakarta Messaging: an overview
    For Jakarta Messaging 3.0, control of the JMS specification moved from Oracle to the Java Community Process. However, Oracle retains control of the "javax" name ...
  61. [61]
    High availability configurations - IBM MQ
    You can use multi-instance queue managers to configure your own highly available messaging systems based on IBM MQ, without requiring a cluster technology such ...Missing: mainframes | Show results with:mainframes
  62. [62]
    IBM MQ for z/OS
    With bespoke code made for IBM z/OS®, MQ is the best way to transfer data on the mainframe. Get stability, reliability and security-rich messaging.
  63. [63]
    Advanced Queuing and Transactional Event Queues
    A message is created by the enqueue call and consumed by the dequeue call. The possible message payload data types are: JSON. RAW. User-Defined Type. XML.
  64. [64]
    25 Oracle Advanced Queuing
    Oracle Advanced Queuing (AQ) provides database-integrated message queuing functionality. It is built on top of Oracle Streams and optimizes the functions of ...<|control11|><|separator|>
  65. [65]
  66. [66]
  67. [67]
    What is Tibco Ems | ApiX-Drive
    One common use case for TIBCO EMS is in financial services, where it ensures the secure and timely transfer of transactional data between banking systems.
  68. [68]
    Solace PubSub+ Messaging API for Jakarta Messaging - Solace Docs
    The standard Jakarta JMS 3.1 API. Utilities for Solace Messaging API for Java. Package, Description. com.solacesystems ...Missing: support | Show results with:support
  69. [69]
    Solace Platform
    Solace Platform is an event streaming, management and monitoring platform purpose-built for event-driven architecture.
  70. [70]
    IBM MQ Advanced
    With IBM® MQ Advanced, you can more easily implement reliable business continuity mechanisms to stay up and running. Share data across environments with ease; ...
  71. [71]
    [PDF] TIBCO Enterprise Message Service™
    Jan 16, 2024 · • Full TCK- certification for Jakarta Messaging 2.0 and 3.0 specifications. • Provides native messaging support for multiple languages.Missing: 3.1 | Show results with:3.1