Java Message Service
Encyclopedia
The Java Message Service (JMS) API
Application programming interface
An application programming interface is a source code based specification intended to be used as an interface by software components to communicate with each other...

 is a Java
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...

 Message Oriented Middleware (MOM) API for sending messages between two or more clients
Client (computing)
A client is an application or system that accesses a service made available by a server. The server is often on another computer system, in which case the client accesses the service by way of a network....

. JMS is a part of the Java Platform, Enterprise Edition
Java Platform, Enterprise Edition
Java Platform, Enterprise Edition or Java EE is widely used platform for server programming in the Java programming language. The Java platform differs from the Java Standard Edition Platform in that it adds libraries which provide functionality to deploy fault-tolerant, distributed, multi-tier...

, and is defined by a specification developed under the Java Community Process
Java Community Process
The Java Community Process or JCP, established in 1998, is a formalized process that allows interested parties to get involved in the definition of future versions and features of the Java platform....

 as JSR 914. It is a messaging standard that allows application components based on the Java Enterprise Edition (JEE) to create, send, receive, and read messages. It allows the communication between different components of a distributed application
Distributed computing
Distributed computing is a field of computer science that studies distributed systems. A distributed system consists of multiple autonomous computers that communicate through a computer network. The computers interact with each other in order to achieve a common goal...

 to be loosely coupled
Loose coupling
In computing and systems design a loosely coupled system is one where each of its components has, or makes use of, little or no knowledge of the definitions of other separate components. The notion was introduced into organizational studies by Karl Weick...

, reliable, and asynchronous.

General idea of messaging

Messaging is a form of loosely coupled distributed communication, where in this context the term 'communication' can be understood as an exchange of messages between software components. Message-oriented technologies attempt to relax tightly coupled communication (such as TCP
Transmission Control Protocol
The Transmission Control Protocol is one of the core protocols of the Internet Protocol Suite. TCP is one of the two original components of the suite, complementing the Internet Protocol , and therefore the entire suite is commonly referred to as TCP/IP...

 network sockets
Stream socket
In computer networking, a stream socket is a type of internet socket which provides a connection-oriented, sequenced, and unduplicated flow of data without record boundaries, with well-defined mechanisms for creating and destroying connections and for detecting errors.This internet socket type...

, CORBA
Common Object Request Broker Architecture
The Common Object Request Broker Architecture is a standard defined by the Object Management Group that enables software components written in multiple computer languages and running on multiple computers to work together .- Overview:CORBA enables separate pieces of software written in different...

 or RMI
Java remote method invocation
The Java Remote Method Invocation Application Programming Interface , or Java RMI, is a Java application programming interface that performs the object-oriented equivalent of remote procedure calls ....

) by the introduction of an intermediary component. This approach allows software components to communicate 'indirectly' with each other. Benefits of this include message senders not needing to have precise knowledge of their receivers.

The advantages of messaging include the ability to integrate heterogeneous platforms, reduce system bottlenecks, increase scalability, and respond more quickly to change.

Elements

The following are JMS elements:

JMS provider
An implementation of the JMS interface for a Message Oriented Middleware (MOM). Providers are implemented as either a Java JMS implementation or an adapter to a non-Java MOM.

JMS client
An application or process that produces and/or receives messages.

JMS producer/publisher
A JMS client that creates and sends messages.

JMS consumer/subscriber
A JMS client that receives messages.

JMS message
An object that contains the data being transferred between JMS clients.

JMS queue
A staging area that contains messages that have been sent and are waiting to be read. Note that, contrary to what the name queue suggests, messages don't have to be delivered in the order sent. A JMS queue only guarantees that each message is processed only once.

JMS topic
A distribution mechanism for publishing messages that are delivered to multiple subscribers.

Models

The JMS API supports two models:
  • Point-to-point
  • Publish and subscribe
    Publish/subscribe
    Publish–subscribe is a messaging pattern where senders of messages, called publishers, do not program the messages to be sent directly to specific receivers, called subscribers. Published messages are characterized into classes, without knowledge of what, if any, subscribers there may be...


Publish/subscribe model

The publish/subscribe model supports publishing messages to a particular message topic. Subscribers may register interest in receiving messages on a particular message topic. In this model, neither the publisher nor the subscriber knows about each other. A good analogy for this is an anonymous bulletin board.
  • Zero or more consumers will receive the message.
  • There is a timing dependency between publishers and subscribers. The publisher has to create a message topic for clients to subscribe. The subscriber has to remain continuously active to receive messages, unless it has established a durable subscription. In that case, messages published while the subscriber is not connected will be redistributed whenever it reconnects.


Using Java, JMS provides a way of separating the application from the transport layer
Transport layer
In computer networking, the transport layer or layer 4 provides end-to-end communication services for applications within a layered architecture of network components and protocols...

 of providing data. The same Java classes
Class (computer science)
In object-oriented programming, a class is a construct that is used as a blueprint to create instances of itself – referred to as class instances, class objects, instance objects or simply objects. A class defines constituent members which enable these class instances to have state and behavior...

 can be used to communicate with different JMS providers by using the JNDI
Java Naming and Directory Interface
The Java Naming and Directory Interface is a Java API for a directory service that allows Java software clients to discover and look up data and objects via a name. Like all Java APIs that interface with host systems, JNDI is independent of the underlying implementation...

 information for the desired provider. The classes first use a connection factory to connect to the queue or topic, and then use populate and send or publish the messages. On the receiving side, the clients then receive or subscribe to the messages.

Provider implementations

To use JMS, one must have a JMS provider that can manage the sessions and queues. Starting from Java EE version 1.4, JMS provider has to be contained in all Java EE application servers. This can be implemented using the message inflow management of the Java EE Connector Architecture
Java EE Connector Architecture
Java EE Connector Architecture is a Java-based technology solution for connecting application servers and enterprise information systems as part of enterprise application integration solutions. While JDBC is specifically used to connect Java EE applications to databases, JCA is a more generic...

, which was first made available in that version.

The following is a list of JMS providers:
  • Apache
    Apache Software Foundation
    The Apache Software Foundation is a non-profit corporation to support Apache software projects, including the Apache HTTP Server. The ASF was formed from the Apache Group and incorporated in Delaware, U.S., in June 1999.The Apache Software Foundation is a decentralized community of developers...

     ActiveMQ
  • Apache Qpid
    Apache Qpid
    Apache Qpid is an open source messaging system which implements the Advanced Message Queuing Protocol. It provides transaction management, queuing, distribution, security, management, clustering, federation and heterogeneous multi-platform support.-See also:*Apache ActiveMQ*Message-oriented...

    , using AMQP
  • EMS from TIBCO
  • FioranoMQ® from Fiorano Software
  • Nirvana JMS from my-Channels
  • OpenJMS
    Openjms
    OpenJMS is one of the major providers of Java Message Service API, which implements Sun Microsystems' Java Message Service API 1.1 Specification. The current release is OpenJMS 0.7.7-beta-1....

    , from The OpenJMS Group
  • JBoss Messaging
    JBoss Messaging
    JBoss Messaging is the JBoss enterprise asynchronous messaging system. It supersedes JBoss MQ as the default Java Message Service provider in JBoss Application Server 5....

     and HornetQ
    HornetQ
    HornetQ is an open source asynchronous messaging project from JBoss. It is an example of Message Oriented MiddlewareHornetQ is an open source project to build a multi-protocol, embeddable, very high performance, clustered, asynchronous messaging system....

     from JBoss
    JBoss (company)
    JBoss is a division of Red Hat, Inc.. It specializes in open-source middleware software.The company profits from a service-based business model. JBoss employ a Professional Open Source business model where the core developers of projects make a living and offer their services...

  • JORAM
    JORAM
    is an open-source message broker which is certified to fully implement the Java Message Service API 1.1 . JORAM is available for since May 2000....

    , from the OW2 Consortium
  • Open Message Queue
    Open Message Queue
    Open Message Queue is an open source message-oriented middleware project by Sun Microsystems that implements the Java Message Service 1.1 API . In addition to support for the JMS API, OpenMQ provides additional enterprise features including clustering for scalability and high availability, a C...

    , from Sun Microsystems
    Sun Microsystems
    Sun Microsystems, Inc. was a company that sold :computers, computer components, :computer software, and :information technology services. Sun was founded on February 24, 1982...

  • BEA Weblogic (part of the Fusion Middleware
    Oracle Fusion Middleware
    Oracle Fusion Middleware consists of several software products from Oracle Corporation. OFM spans multiple services, including Java EE and developer tools, integration services, business intelligence, collaboration, and content management...

     suite) and Oracle AQ from Oracle
    Oracle Corporation
    Oracle Corporation is an American multinational computer technology corporation that specializes in developing and marketing hardware systems and enterprise software products – particularly database management systems...

  • RabbitMQ
    RabbitMQ
    RabbitMQ is an open source message broker software , using the standard Advanced Message Queuing Protocol . The RabbitMQ server is written in Erlang and is built on the Open Telecom Platform framework for clustering and failover. Rabbit Technologies Ltd., acquired in April 2010 by VMware, develops...

    , using AMQP
  • Solace JMS from Solace Systems
    Solace systems
    Solace Systems is a content networking company based in Kanata, Ontario, Canada that manufactures and sells middleware appliances. Middleware appliances are rack-mountable network devices that implement message-oriented middleware and content-based routing in purpose-built hardware...

  • SonicMQ from Progress Software
    Progress Software
    Progress Software Corporation , formerly Data Language Corporation, is an American software company that sells business application infrastructure software. Its best known product is the OpenEdge ABL , which was developed in the early 1980s. The best known application written in Progress is...

  • StormMQ
    StormMQ
    In computing, StormMQ is a message queuing service , using the standard Advanced Message Queuing Protocol . StormMQ is a hosted, On-Premise or Cloud solution for Machine-to-Machine Message Queuing using AMQP...

    , using AMQP
  • SwiftMQ
  • WebSphere Application Server
    WebSphere Application Server
    IBM WebSphere Application Server , a software application server, is the flagship product within IBM's WebSphere brand. It was initially created by Donald Ferguson, who later became CTO of CA Technologies, and the first version launched in 1998....

     from IBM
    IBM
    International Business Machines Corporation or IBM is an American multinational technology and consulting corporation headquartered in Armonk, New York, United States. IBM manufactures and sells computer hardware and software, and it offers infrastructure, hosting and consulting services in areas...

    , which provides an inbuilt default messaging provider known as the Service Integration Bus (SIBus), or which can connect to WebSphere MQ
    WebSphere MQ
    IBM WebSphere MQ' is a family of network software products launched by IBM in March 1992. It was previously known as MQSeries, a trademark that IBM rebranded in 2002 to join the suite of WebSphere products. WebSphere MQ, which is often referred to simply as "MQ" by users, is IBM's Message...

     as a JMS provider
  • WebSphere MQ
    WebSphere MQ
    IBM WebSphere MQ' is a family of network software products launched by IBM in March 1992. It was previously known as MQSeries, a trademark that IBM rebranded in 2002 to join the suite of WebSphere products. WebSphere MQ, which is often referred to simply as "MQ" by users, is IBM's Message...

     (formerly MQSeries) from IBM
    IBM
    International Business Machines Corporation or IBM is an American multinational technology and consulting corporation headquartered in Armonk, New York, United States. IBM manufactures and sells computer hardware and software, and it offers infrastructure, hosting and consulting services in areas...

  • Ultra Messaging from 29 West (acquired by Informatica
    Informatica
    Informatica Corporation is a NASDAQ listed company with ticker INFA. Founded in 1993, its headquarters is in Redwood City, California. Founded by Diaz Nesamoney and Gaurav Dhillon...

    )
  • MetaFluent JMS


A historical comparison matrix of JMS providers from 2005 is available at http://www.theserverside.com/reviews/matrix.tss

External links



See also

  • Message queue
    Message queue
    In computer science, message queues and mailboxes are software-engineering components used for interprocess communication, or for inter-thread communication within the same process. They use a queue for messaging – the passing of control or of content...

     - the concept underlying JMS
  • Service Oriented Architecture
    • Event-driven SOA
      Event-driven SOA
      Event-driven SOA is a form of service-oriented architecture , combining the intelligence and proactiveness of event-driven architecture with the organizational capabilities found in service offerings...


  • Messaging technologies that do not implement the JMS API include:
    • Advanced Message Queuing Protocol
      Advanced Message Queuing Protocol
      The Advanced Message Queuing Protocol is an open standard application layer protocol for message-oriented middleware. The defining features of AMQP are message orientation, queuing, routing , reliability and security.AMQP mandates the behaviour of the messaging provider and client to the extent...

       (AMQP) – standardized message queue protocol with multiple independent implementations
    • Amazon Simple Queue Service
      Amazon Simple Queue Service
      Amazon Simple Queue Service is a distributed queue messaging service introduced by Amazon.com in April of 2006. It supports programmatic sending of messages via web service applications as a way to communicate over the internet...

       - commoditized messaging service provided by Amazon.com
      Amazon.com
      Amazon.com, Inc. is a multinational electronic commerce company headquartered in Seattle, Washington, United States. It is the world's largest online retailer. Amazon has separate websites for the following countries: United States, Canada, United Kingdom, Germany, France, Italy, Spain, Japan, and...

       for a per-use fee. It allows users to rent access to messaging without having to maintain their own server .
    • Microsoft Message Queuing
      Microsoft Message Queuing
      Microsoft Message Queuing or MSMQ is a Message Queue implementation developed by Microsoft and deployed in its Windows Server operating systems since Windows NT 4 and Windows 95. The latest Windows 7 also includes this component...

       - similar technology, implemented for .NET Framework
      .NET Framework
      The .NET Framework is a software framework that runs primarily on Microsoft Windows. It includes a large library and supports several programming languages which allows language interoperability...

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK