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.
RE: What is the difference between Point to Point and Publish/Subscribe Messaging Domains
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
RE: What is the difference between Point to Point and ...
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.
RE: What is the difference between Point to Point and ...
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.
RE: What is the difference between Point to Point and ...
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