Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

p2p and pub/sub

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
If a regular clown is funny, then a larger clown would be funnier. Math. Verified by this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic