wood burning stoves 2.0*
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes JMS - Queue - number of senders? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "JMS - Queue - number of senders?" Watch "JMS - Queue - number of senders?" New topic
Author

JMS - Queue - number of senders?

Raj Rad
Greenhorn

Joined: May 20, 2002
Posts: 10
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
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
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

Joined: May 20, 2002
Posts: 10
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JMS - Queue - number of senders?
 
Similar Threads
Why there is so hype of JMS in just to send a message? Please give some explanations..
Delivery of message in jms to multiple clients
What would be the correct choices
JMS