Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

JMS - Queue - number of senders?

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Most people say that
Queue - One sender and one receiver
Pub/Sub - One sender and multiple receiver.
I don't think this is a rule. Because of the fact that any number of clients can send messages to a Queue or a topic. So the number of senders can be anything.
Whereas a Queue is intended for a single receipient and Topic is intended for multiple clients. JMS doesn't define the behavior for multiple clients listening to the queue, but it's intended for a single client.
My question boils down to the number of senders in both cases.
Is the number of senders is one or multiple in both cases?
Thanks
Raj
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Raj Rad:
Most people say that
Queue - One sender and one receiver
Pub/Sub - One sender and multiple receiver.


You are mixing terminology. It is:
Point-to-Point - One sender to One Receiver
Publish-Subscribe - One sender to Many Receivers
To do Point-to-Point in JMS you typically use a Queue and to do Publish-Subscribe you typically use a Topic, though both could be implemented with either.
Using a Queue one sender to one receiver is guaranteed, meaning a single message will only ever be consumed by one receiver. Many producers may send messages to the same Queue, however each message will only be consumed by a single consumer.
Using a Topic one sender to many receivers is guaranteed, meaning a single message will be consumed by ALL subscribers. Many producers may send messages to the same Topic and each message will make its way to each consumer.
 
Raj Rad
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I understand your explaination and thanks for the same. But in both cases, the number of senders can be more than one, right? For example an Order processing system and a Stock trading system both can post Order confirmation and a trade confirmation to a single 'Response' queue. A single response processing system can fetch the messages and notify the clients appropriately.
My concern is the exam point of view. Should I say both domains always have 'single' sender?
Thx
Raj
 
Life just hasn't been the same since the volcano erupted and now the air is full of tiny ads.
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic