LLMpediaThe first transparent, open encyclopedia generated by LLMs

Jakarta JMS

Generated by GPT-5-mini
Note: This article was automatically generated by a large language model (LLM) from purely parametric knowledge (no retrieval). It may contain inaccuracies or hallucinations. This encyclopedia is part of a research project currently under review.
Article Genealogy
Parent: WildFly Hop 5
Expansion Funnel Raw 55 → Dedup 0 → NER 0 → Enqueued 0
1. Extracted55
2. After dedup0 (None)
3. After NER0 ()
4. Enqueued0 ()
Jakarta JMS
NameJakarta JMS
DeveloperJakarta EE Working Group
Released1998 (as Java Message Service)
Latest releaseJakarta Messaging 3.1 (as of 2024)
Programming languageJava
Operating systemCross-platform
LicenseEclipse Foundation specifications

Jakarta JMS

Jakarta JMS is the Jakarta EE specification that standardizes asynchronous messaging for enterprise Java applications. It defines APIs and semantics for producing, sending, receiving, and consuming messages between distributed components across platforms such as Apache TomEE, WildFly, GlassFish, Payara Server, and Open Liberty. Jakarta JMS builds on decades of work from predecessors and industry implementations including IBM WebSphere MQ, Oracle WebLogic Server, ActiveMQ, RabbitMQ, and Apache Kafka integrations.

Overview

Jakarta JMS provides a uniform programming model for messaging addressing interoperability among vendors such as Red Hat, Eclipse Foundation, Oracle Corporation, IBM, and Apache Software Foundation. The specification includes concepts like destinations, producers, consumers, sessions, and message types that map to broker features in products like Apache ActiveMQ Artemis, Amazon MQ, Azure Service Bus, Google Cloud Pub/Sub, and Confluent Platform. As part of the Jakarta EE ecosystem alongside specifications like Jakarta CDI, Jakarta Transactions, Jakarta Security, Jakarta RESTful Web Services, and Jakarta Persistence, Jakarta JMS integrates with container-managed resources and dependency injection.

History and Evolution

Originating as the Java Message Service (JMS) under the Java Community Process and driven by vendors including Sun Microsystems and BEA Systems, the API evolved through versions JMS 1.0, 1.1, and JMS 2.0. Following the transfer of Java EE to the Eclipse Foundation, JMS was rebranded and updated under Jakarta EE, aligning with newer Jakarta specifications and changing package names in later releases. Major milestones involved adoption by middleware vendors such as IBM, Oracle, Red Hat, and community projects like Apache ActiveMQ and Apache Kafka connectors that influenced changes in API convenience methods, asynchronous delivery, and server-side connection management.

Architecture and Components

Jakarta JMS specifies a client API that interacts with a messaging provider (broker) such as ActiveMQ Artemis, RabbitMQ (via adapters), Amazon MQ, and Azure Service Bus providers. Core components include ConnectionFactory, Connection, Session, MessageProducer, MessageConsumer, Queue, Topic, and Message types like TextMessage, BytesMessage, ObjectMessage, MapMessage, and StreamMessage. The model interoperates with resource adapters defined by Jakarta Connector Architecture and lifecycle management in application servers such as GlassFish and WildFly. Messaging topologies map to patterns documented by vendors like Martin Fowler and are implemented using protocols like AMQP, MQTT, STOMP, and vendor protocols such as IBM MQ native wire formats.

Core Concepts and APIs

Developers use Jakarta JMS APIs to create connections from a javax.jms-like factory abstraction managed by containers such as Payara Server or Open Liberty, create sessions with acknowledgment modes, and send messages to destinations represented by queue and topic objects. The API supports point-to-point and publish–subscribe messaging paradigms, message selectors using SQL-92–style expressions, durable subscriptions, and message-driven beans (MDBs) in integration with Jakarta EJB and Jakarta CDI. Transaction boundaries are coordinated with Jakarta Transactions (JTA) to allow XA flows across databases like PostgreSQL or Oracle Database and brokers such as ActiveMQ.

Implementations and Providers

Multiple vendors and open-source projects implement the Jakarta JMS specification: Apache ActiveMQ, Apache ActiveMQ Artemis, Red Hat AMQ Broker, IBM MQ, Tibco EMS, Oracle WebLogic JMS, JMS over Kafka adapters maintained by Confluent, and cloud services from Amazon Web Services and Microsoft Azure. Application servers such as WildFly, GlassFish, Payara Server, Apache TomEE, and Open Liberty bundle or integrate with provider libraries and resource adapter archives that implement the Jakarta JMS SPI.

Usage and Examples

Typical usage includes creating a ConnectionFactory from JNDI lookups provided by Jakarta Naming and Directory Interface providers in containers like WildFly or standalone clients that use vendor classes from ActiveMQ Artemis or IBM MQ. Producers create messages (e.g., TextMessage) and send to Queue or Topic destinations; consumers receive synchronously or register asynchronous MessageListener callbacks often used in Message-Driven Bean deployment descriptors or Jakarta CDI managed beans. Examples cover durable subscribers for topic delivery guarantees, use of message selectors for content-based routing, and integration with Jakarta RESTful Web Services endpoints to bridge HTTP requests to messaging workflows.

Performance and Scalability

Performance characteristics depend on provider implementations and configuration: broker persistence, store-and-forward strategies, message batching, prefetch settings, network of brokers clustering, and protocol choices such as AMQP versus proprietary wire formats. Scalable deployments use broker clustering (e.g., ActiveMQ Artemis replication), sharding, and horizontal scaling across instances on platforms like Kubernetes with operators from Red Hat or cloud-managed brokers from Amazon MQ and Azure Service Bus. Benchmarks often compare throughput and latency between providers like Apache Kafka (when used as a JMS backend) and traditional JMS brokers such as IBM MQ.

Security and Transaction Management

Jakarta JMS supports authentication and authorization models exposed by providers and containers such as realm integration in WildFly, TLS/SSL transport security, SASL mechanisms for protocols like AMQP, and role-based access control configured in brokers like ActiveMQ and IBM MQ. Transaction management uses local and XA transactions coordinated with Jakarta Transactions; message acknowledgment modes (AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE) and transactional sessions define delivery semantics. Secure deployments follow best practices from vendors including certificate management, network isolation in AWS VPC or Azure Virtual Network, and integration with identity providers like Keycloak or Okta.

Category:Jakarta Specifications