GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  J2EE  >  JMS
Go To First  |  Previous Question  |  Next Question 
 JMS  |  Question 5 of 17    Print  
What is the difference between Message producer and Message consumer

Messaging systems provide a host of powerful advantages over other, more conventional distributed computing models. Primarily, they encourage "loose coupling" between message consumers and message producers. There is a high degree of anonymity between producer and consumer: to the message consumer, it doesn't matter who produced the message, where the producer lives on the network, or when the message was produced.


Messaging Systems and the Java Message Service (JMS)

  1. Message Service
  2. What is a Messaging System?
  3. Message System Types
  4. The Java Message ServiceJMS Clients Can Use Java Facilities
  5. What is a Message?
  6. Building a JMS Client
    A typical JMS client can be built following these basic steps:
    1. Create a connection to the messaging system provider
    2. Create sessions, for sending and receiving messages
    3. Create MessageProducers and MessageConsumers to create or receive messages



  
Total Answers and Comments: 2 Last Update: August 14, 2006   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
July 17, 2005 11:07:25   #1  
Jakeer Singh        

RE: What is the difference between Message producer and Message consumer
Message System Types 
Two messaging systems models are in common use. 
 
Publish/Subscribe 
A publish/subscribe (pub/sub) messaging system supports an event driven model where information consumers and producers participate in the transmission of messages. Producers "publish" events, while consumers "subscribe" to events of interest, and consume the events. Producers associate messages with a specific topic, and the messaging system routes messages to consumers based on the topics the consumers register interest in. 
 
Point-To-Point 
In point to point messaging systems, messages are routed to an individual consumer which maintains a queue of "incoming" messages. Messaging applications send messages to a specified queue, and clients retrieve messages from a queue. 
 
Frequently vendors will support either point-to-point, or publish/subscribe messaging models, or both. 
 
Having looked at message systems in general, we now see how Java developers can take advantage of their power.

 
Is this answer useful? Yes | No
August 14, 2006 05:02:38   #2  
Srinivas Gorityala        

RE: What is the difference between Message producer an...

There are two types of messagings models.
 1.Peer to Peer model (p to p)
 2.Publisher to Subscriber(pub-sub)
 
 peer to peer model is 1-1 model.
 
 In this model one client can send message to the another client through the Destination.
There is a guarantee to recieve the message whenever reciever is connected.
example:your telephone answering machine ,outer send a message to u,but you can recieve those msg whenever u coonected to answering machine.

 In pubsub model one publisher,many no.of clients willbe there,publisher publish the message,subscriber or consumer can recieve those messages when he got subscription through the topic.There is no guarantee consumer can recieve the messages send by the publisher.

example,dish connection,whenever u get subscription to a particular channel before the program arriving then only u will watch the program. Eventhough u subscribed before the program arrival,if u not connected to particular channel,u willnot watch the movie.


 
Is this answer useful? Yes | No

 Related Questions

The Java Message Service (JMS) defines the standard for reliable Enterprise Messaging. Enterprise messaging, often also referred to as Messaging Oriented Middleware (MOM), is universally recognized as 
Latest Answer : The Java Message Service is a Java API that allows applications to create, send, receive, and read messages. Designed by Sun and several partner companies, the JMS API defines a common set of interfaces and associated semantics that allow programs written ...

A connection is created between the client and the server from a connection factory. Connections can be shared by several threads. The user credentials are supplied at this level. It is probably common 
Latest Answer : Could any one of you give some sample code for JMS and MDB ...

Messaging is playing an increasingly important role in enterprise computing. Its advantages are a natural result of several factors: the trend toward peer-to-peer computing, greater platform heterogeneity, 
Latest Answer : For example, if you are trying to retrieve Stock symbols, does it come under P2P or Pub/SUb model. ...

Sample Source Code : The Producer/Consumer Example Another very good article with sample source code on How Java uses the producer/consumer model to handle images -- An insider's look . Read 
Latest Answer : A producer is the client application that plays the role of a message sender in JMS API.A consumer is the client application that plays the role of a message receiver in JMS API. ...

Messaging systems provide a host of powerful advantages over other, more conventional distributed computing models. Primarily, they encourage "loose coupling" between message consumers and message 
Latest Answer : There are two types of messagings models. 1.Peer to Peer model (p to p) 2.Publisher to Subscriber(pub-sub)  peer to peer model is 1-1 model.  In this model one client can send message to the another client through the Destination.There ...

Latest Answer : Can someone elobarate on this! ...
Read Answers (2) | Asked by : Prashant Sable

What is the use of JMS?In which situations we are using JMS?Can we send message from one server to another server using JMS?
Read Answers (1) | Asked by : Naveen Varanasi

Latest Answer : A JMS message consists of three parts:Message header For message identification. For example, the header is used to determine if a given message is appropriate for a "subscriber" Properties For application-specific, provider-specific, and optional header ...

The header of a message contains message identification and routing information. This includes , but is not limited to :JMSDestinationJMSDeliveryModeJMSMessageIDJMSTimeStampJMSExpirationJMSReplyTOJMSCorrelationIDJMSTypeJMSRedeliveredRegardsSecretcoder 
View Question | Asked by : secretcoder

what is message object? when to use queue and topic? 
Latest Answer : Need to configure for different appServers. Normally all the appserver has console but you need to configure for Jboss in a xml file. I think it is some JBoss-Jms.xml(not sure) but similar file like this. ...
Read Answers (1) | Asked by : Abuthahir


 Sponsored Links

 
Related Articles

What is Consumer Profile

It is very important to document consumer profiles in the data warehouse. Consumer profile constitutes an essential component when the organization needs reports on the operating trends and patterns and how the organization is performing. If the organization is into a business competition, having
 

What is difference between call by value and call by reference in function?

The arguments passed to function can be of two types 1. Values passed 2. Address passed The first type refers to call by value and the second type refers to call by reference. For instance consider program1 main() { int x=50, y=70; interchange(x,y); printf(“x=%d y=%d”,x,
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

Importance of Proper English during Job Interview

Importance of Proper English during Job Interview Your job interview is crucially important and it will determine whether or not you will get the job Depending on the type of job you re going for it is very important for you to use proper English In most cases jobs which offer higher salaries will h
 

Difference between Scholarship and Grant

Difference between Scholarship and Grant While both scholarships and grants allow students to pay for their tuition without having to pay the money back there are a number of key differences between the two Knowing the difference between grants and scholarship will make it much easier for students t
 

HR Interview - HR Interview Mistakes You Will Want To Avoid

HR Interview Mistakes You Will Want To Avoid The job interview can be a stressful process This is especially true for those who are going after a competitive position Your nonverbal communication combined with the answers you give during the interview will determine if you are hired mosgoogle While
 

HR Interview - Behavioral HR Interviews

Behavioral HR Interviews As the name implies a behavioral interview is an interview that is held by a human resources department to determine if an applicant has the behaviors that are appropriate for a job The company must know how an applicant will behave in a certain situations mosgoogle The logi
 

HR Interview - How To Prepare For Your HR Interview

How To Prepare For Your HR Interview Before you begin thinking about how you are going to dress for the interview it is important to do your research first You should learn everything you can about the company you wish to work for When you have detailed information about your employer you will conve
 

HR Interview - Telephone Interview Etiquette

Telephone Interview Etiquette When you conduct a telephone interview for a job it is important to show the proper etiquette Not only is it important it is critical is you wish to be hired by the company There are a number of things you will want to do and other things should never be done mosgoogle
 

Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape