JMS is a specification API that abstracts out communication through messaging systems into a portable framework. Programming against JMS permits the application to be portable to many messaging systems, proprietary, and open source support. There are several vendors of enterprise messaging systems such as Apache ActiveMQ, IBM WebSphereMQ, JBoss Messaging, Oracle AQ, and Progress Software SonicMQ. JMS allows the developer to connect to different vendor products in a similar fashion to JDBC (Java Database Connectivity).
The JMS specification has some terminology and definitions of its components and describes each component's role and responsibility. The following table outlines the components and responsibilities in a JMS application:
We should point out that JMS is not just a messaging system API for two or more Java or Java EE applications to communicate with. JMS can also allow Java systems to communicate data to other systems which are not written in Java and/or the JVM. There are several JMS providers that have extensive support of alternative operating systems, vertical stacks, and architectures such as Microsoft .Net and other proprietary technologies.
JMS 2.0 introduces a simplified API that makes the developer's programming life far easier in comparison to a traditional API. The classic API, which last updated with JMS 1.1, unified the concepts of point-to-point (queues) and publish-subscribe (topic) into a concise whole.
The JMS 1.1 API has been referred to as the classic API since Java EE 7 was released. The classic API married together two previously incompatible library framework calls: queues and topics. The standard package for JMS classic is javax.jms
.
The JMS 2.0 API is simplified and offers all of the features of the classic API yet requires fewer Java interfaces. Moreover, JMS 2.0 introduces flexible annotations for maximum developer affordance. The standard package for the JMS simplified API is defined as javax.jms
, and it contains main interfaces and annotations.
JMS 2.0 supports a set of message types. The most common type that developers will encounter, especially in a professional environment, are text type messages, namely javax.jms.TextMessage
, since an awful lot of enterprise applications send and receive XML data across disparate systems.
Here is a list of the common JMS message types:
JMS Message Type |
Description |
---|---|
This message type represents a series of bytes | |
This type represents a set of name and value pairs | |
This type represents a serialized Java object | |
This type represents a sequence of primitive data types | |
This type represents a set of |
3.12.136.119