JMS definitions

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:

Term

Definition

JMS Provider

Specifies the conduit message system that makes JMS API available. The provider has the responsibility to route and deliver messages

JMS Client

Specifies any Java or Java EE application that makes use of the JMS API

JMS Consumer

Specifies the JMS client that consumes JMS messages

JMS Producer

Specifies the JMS client that produces JMS messages

JMS Message

Specifies the message abstraction that flows through the conduit. A message consists of a header, properties, and payload (also known as the body)

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.

JMS classic API

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.

JMS simplified API

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 message types

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

ByteMessage

This message type represents a series of bytes

MapMessage

This type represents a set of name and value pairs

ObjectMessage

This type represents a serialized Java object

StreamMessage

This type represents a sequence of primitive data types

TextMessage

This type represents a set of java.lang.String objects

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.12.136.119