• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic