What is the difference between Point to Point and Publish/Subscribe Messaging Domains

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, and greater modularity, coupled with the trend away from synchronous communication between processes.

References: Read the following in details here. http://www.javaworld.com/javaworld/jw-01-1999/jw-01-jms_p.html

  1. Messaging services
  2. How does the JMS API fit in?
  3. The advantages of messaging
  4. Putting theory into practice

Showing Answers 1 - 7 of 7 Answers

raj

  • Mar 26th, 2005
 

In point to point messaging there is only one consumer for a message and there is no need for the consumer to be active.The message remains in the queue until the message is consumed or it gets expired. 
In publish to subsribe there can be multiple consumers and the counsumer must be active to consume the message

  Was this answer useful?  Yes

tariq

  • Oct 8th, 2005
 

I think in pub/consum the client need not to be active only.

  Was this answer useful?  Yes

vijayshekar

  • Oct 17th, 2005
 

A point-to-point (PTP) product or application is built around the concept of message queues, senders, and receivers. Each message is addressed to a specific queue, and receiving clients extract messages from the queue(s) established to hold their messages. Queues retain all messages sent to them until the messages are consumed or until the messages expire

In a publish/subscribe (pub/sub) product or application, clients address messages to a topic. Publishers and subscribers are generally anonymous and may dynamically publish or subscribe to the content hierarchy. The system takes care of distributing the messages arriving from a topic's multiple publishers to its multiple subscribers. Topics retain messages only as long as it takes to distribute them to current subscribers.

  Was this answer useful?  Yes

Guest

  • Mar 22nd, 2006
 

Hi,

Point-to-point messaging model: Consider it as 1:1. Only one publisher and one subscriber all the time. Since it is asynhronous model subscriber need not be present all the time. It may have shutdown due to some reason. All messages are retained in Queue until subscriber comes up. Whereas publisher need to be active and running.

Publisher-Subscriber messaging model: Consider it as M:N. Multipler publishers:Multiple subscribers. All messages in Topic are retained until their corresponding consumers (subscribers) comes up. Again here Publishers need to be active all the time, while subscribers can join and disconnect any time. Please correct me if I am wrong.

-hmashruf

Shunmuga

  • Mar 24th, 2006
 

Point to Point Model is unicasting andPublish/Subscribe model is multicasting

  Was this answer useful?  Yes

Kartikey

  • Apr 24th, 2007
 

Hi All,

I have gone thu the replies from all of you and collectively the difference is correct.

P2P and Pub-Sub are two different mechanism. There could be M senders and N receivers in both the cases.
In P2P a massage will be received by only one consumer and if there is not any consumer the message will be kept (It will be lost in case of server crash). Whereas in Pub-Sub every single message would be consumed by all the receivers and if thr is not any receiver message will be lost (It can be prevented by Durable subscriber).

If someone want to have fine grain on this I will recommend to refer weblogic documentation.
edocs.bea.com

or you can directly ask me your queries.

  Was this answer useful?  Yes

Ram

  • Nov 7th, 2007
 

For example, if you are trying to retrieve Stock symbols, does it come under P2P or Pub/SUb model.

  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.

Answer Question

Click here to Login / Register your free account


 
Send   Reset

 

Related Answered Questions

 

Related Open Questions