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.

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

tariq

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.

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.

Shunmuga

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

Sponsored Links

Social Networks

Sponsored Links

Open Questions

The header of a message contains message identification and routing information. This includes , but is not limited to :JMSDestinationJMSDeliveryModeJMSMessageIDJMSTimeStampJMSExpirationJMSReplyTOJMSCorrelationIDJMSTypeJMSRedeliveredRegardsSecretcoder

What is the difference between controlled and uncontrolled redundancy? Illustrate with examples.

Asked by: mian haroon

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.