This week's book giveaway is in the Java in General forum.
We're giving away four copies of Event Streams in Action and have Alexander Dean & Valentin Crettaz on-line!
See this thread for details.
Win a copy of Event Streams in Action this week in the Java in General 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Messaging PointTopoint and Publish-Subscribe

 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Members,

I was reviewing Messaging from IBM document, and they said regarding point-to-point Model that the message is sent to queue and the receiver get the message from there, and they could be many senders, but just one receiver consumes the message from the queue.
For Publish/Subscribers, they said the message goes to a Topic, which mean all subscribers to that Topic will get the message also many senders can send message to that topic (many Senders and many Receivers)

In contrast, I had a question from Whizlab test, where they said
Public/Subscrib Messaging = one Sender and Many receivers
Point-to-point messaging = one Sender and one Receiver.
Can some one help me to clarify this please, I really need the answer as soon as possible ...

Thank you so much for you help and response

Best Regards,
Rania
 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rania,

both are right from their point of view.

I think IBM's view is a bit misleading and mixes up the message itself and the mediation (queue/topic).

Focussing the view on a single message:
- One single message is always emitted by one sender (no doubt about that, I think).
- In P2P one message is always consumed by exactly one receiver.
- In Pub/Sub one message goes to many receivers (all that are subscribed).
So that's what Whizlabs is talking about.

If you focus on the mediation, you end up with IMB's view:
- Queue: Many senders sending, but each message is consumed by only one receiver.
- Topic: Many senders sending, each message gets distributed to the subscribers.

I think Whizlabs's view is a bit more to the point, because IBM doesn't consider, that also in P2P it is possible, that there is more than one receiver listening to the queue (done that) - but as soon as one receiver has taken a message from the queue, it is consumed.

Hope that helps,
Frank
 
rania ferrag
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks a lot Frank for the prompt answer, I think I got the idea...

Best Regards,

Rania
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!