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

Showing Answers 1 - 2 of 2 Answers

Jakeer Singh

  • Jul 17th, 2005
 

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.

Srinivas Gorityala

  • Aug 14th, 2006
 

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.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions