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.