Home

JMS

Java Message Service (JMS) is a Java API designed for asynchronous communication between components of a distributed application. Part of Java Platform, Enterprise Edition (Java EE) and now Jakarta EE, JMS provides a standard interface for creating, sending, receiving, and reading messages, independent of the underlying messaging broker.

JMS defines two messaging models: point-to-point using queues, and publish/subscribe using topics. A producer sends messages

Key concepts include connections, sessions, message producers, and message consumers. JMS supports both synchronous receive calls

JMS has evolved through versions. JMS 1.0.2 and 1.1 established the core API and the two messaging

to
a
destination,
and
a
consumer
receives
them
from
that
destination.
Destinations
may
be
durable
or
non-durable;
in
the
publish/subscribe
model,
subscribers
may
be
durable,
receiving
messages
even
when
offline.
In
many
implementations,
destinations
were
looked
up
via
JNDI
in
older
environments.
and
asynchronous
message
delivery
via
a
MessageListener.
Delivery
can
be
persistent
or
non-persistent,
and
transactions
or
session-level
acknowledgment
can
be
used
to
ensure
reliability.
It
also
defines
standard
message
types
such
as
TextMessage,
BytesMessage,
MapMessage,
ObjectMessage,
and
StreamMessage.
domains.
JMS
2.0
introduced
JMSContext,
a
simplified
API
with
auto-closeable
resources
and
unified
resource
management.
With
the
transition
from
Java
EE
to
Jakarta
EE,
the
API
package
name
changed
from
javax.jms
to
jakarta.jms.
Many
vendors
provide
compatible
implementations,
including
Apache
ActiveMQ
Artemis,
Apache
ActiveMQ
Classic,
and
IBM
MQ.
JMS
remains
Widely
used
for
integrating
enterprise
applications,
enabling
decoupled
components
and
scalable
messaging
architectures.