JMS


Message is a method of communication between a software component or application. A messaging client can send a message to other client and can receive a message from other client. Each client connects the Messaging agent to creating, sending , receiving and reading a Message.

The difference between E-mail and Messaging is :
E-mail is communication between people or between software applications and people.
Messaging is used for communication between software applications and software components.

Java Messaging Service is a Java API that allows applications to create, send, receive and read messages.

JMS applications features are:
1)Loosely coupled: A component sends a message to a destination, and the recipient can retrieve the message from the destination. However, the sender and the receiver do not have to be available at the same time in order to communicate. In fact, the sender does not need to know anything about the receiver; nor does the receiver need to know anything about the sender. The sender and the receiver need to know only what message format and what destination to use.
2)Asynchronous: A JMS provider can deliver messages to a client as they arrive; a client does not have to request messages in order to receive them.
3)Reliable: The JMS API can ensure that a message is delivered once and only once. Lower levels of reliability are available for applications that can afford to miss messages or to receive duplicate messages.

You can use the Java API in the fallowing situations:
I)The you want the components not to depend on information about other components’ interfaces, so that components can be easily replaced.
II)The provider wants the application to run whether or not all components are up and running simultaneously.
III)The application business model allows a component to send information to another and to continue to operate without receiving an immediate response.

JMS application is composed of fallowing parts:
1) JMS provider: It is a messaging system that implements JMS interfaces and provides administrative and control features.
2)JMS Clients: These are the programs or components written in Java programing language, that produce and consume messages.
3)Messages: These are the objects that communicate information between JMS clients.
4)Administered objects: These are preconfigured JMS objects created by an administer for the use of clients. The two kinds of Administered objects are destinations and connection factories.
5)Native Clients: these are the programs that use a messaging product’s native client api instead of JMS api.

Fallowing figure illustrate the way these parts interacts:

JMS provides the two types of domain applications
1)Point- to- Point Messaging domain.
2)Publish/Subscribe Messaging domain.

1)Point-to-point Messaging domain:
PTP messaging have fallowing characteristics
→ Each message has only one consumer.
→ A sender and receiver of a message have no timing dependencies. The receiver can fetch the message whether or not it was running when the client sends the message.
→ The receiver acknowledges the successful processing of message.
Use PTP when every message you send must be processed successfully by one consumer.

2)Publish/Subscribe Messaging domain:
pub/sub messaging have fallowing characteristics.
→ Each message may have multiple consumers
→ Publishers and subscribers have a timing dependency. A client that subscribes to a topic can consume only messages published after the client has created a subscription, and the subscriber must continue to be active in order for it to consume messages.

The basic building blocks of a JMS application consist of
Administered objects:Connection factories and destinations Connections
Sessions
Message producers
Message consumers
Messages

These building blocks explained one by one as fallows.

1)Administered Objects:

Advertisements
About

I born in Good cultural place called India. My family is traditional family. We fallow all Indian traditions.

Posted in JMS

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 680 other followers

Calendar
July 2009
M T W T F S S
    Apr »
 12345
6789101112
13141516171819
20212223242526
2728293031  
Mallikarjun Gunda

This is Mallikarjun Gunda, I am working as a software professional. Blogging is my Passion. This blog contains the posts on Java related technologies and programming languages. I am happy to share my knowledge through the blogs.

Blog Stats
  • 222,930 hits
IndiBlogger
malliktalksjava.wordpress.c...
70/100
All tags
Apache Cassandra Arrays in Java Cassandra Cassandra Database Cassandra examples client stubs creating a java web service creating a web service using java difference between interface and abstract class Differences between SOAP and RESTfull webservices Display div as Overlay using JQuery download the spring basic application File directory Generating webservice client stubs Hibernate hibernate exceptions How to display over using JQuery how to generated web service client stubs in STS How to implement Spring basic application how to write singleton design pattern in java interface in java Java Java Arrays Java Example Programs Java examples Java interview questions java programs java project Java sample Programs JavaScript Java Script JavaServer Faces Java Sorting alogorithms Java Tutorials javatutorials Java Web services JDBC open shift openshift Overlay implementation using JQuery Overlay in JQuery POI API POI Examples public class public static void main Redhat OpenShift representational state transfer Restfull webservices Sample Overlay html with JQuery sample programs in java Service-oriented architecture Singleton design pattern in java SOAP SOAP Webservices software Spring Framework Spring Interview Questions Spring MVC Spring MVC Example program Spring MVC sample Program Spring Sample Programs Spring Tutorials Struts technology Top Java Interview questions w3c dom Web service web service client Web Service Description Language Web services webservices writing singleton design pattern in Java WSDL Xml xml parsers