• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

p2p and pub/sub

 
roy siju
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I get confused with different answers in different places about p2p and pub/sub.

p2p -->
1 sender 1 receiver
OR
N sender 1 receiver

pub/sub -->
1 publisher n subscriber
OR
n publisher n subscriber.

personally I have worked with p2p model in JMS and I have used BOTH 1 sender and n sender.

But, in the examination respect what is the answer ???
[ Even in some place I have found an answer - N receiver in case of p2p..Logic: only 1 receiver will receive rest of then will not receive.
]

Thanks
Roy

 
Philippe Maquet
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Roy,

I'd reply:

- p2p (queues): n senders / 1 receiver
- pub/sub (topics): n senders + n receivers

Regards,

Phil.
 
Ray Ye
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi roy,

The question is a bit ambiguous.

As to the queue in P2P, you can have n senders and n receivers; but as to the message in P2P, it can only be consumed by one receiver at anytime.

For Pub/Sub,
both the topic and message can have n senders and n receivers.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic