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

 Print  |  
Question:  What is the difference between Message producer and Message consumer

Answer:

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


July 07, 2005 11:07:25 #1
 Jakeer Singh   Member Since: Visitor    Total Comments: N/A 

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.
     

 

Back To Question