Messaging is a technology applications use to exchange data, to transfer a data structure (such as a record or set of records, a serialized Java object, the text for an XML document, etc.) from one process' memory heap to another. To transfer the data via a messaging system, the applications put the data in a Message (aka Message) and transfer it via a Destination (aka Message Channel). An application that adds messages to a destination does so using a MessageProducer. An application uses a MessageConsumer to remove messages from a destination. (A.k.a. Message Endpoints.)
There are two kinds (subtypes) of destination in JMS:
- Queue (aka Point-to-Point Channel) -- A queue delivers each message to exactly one consumer. A queue can have multiple consumers, but only one will get each message. (See Competing Consumers.)
- Topic (aka Publish-Subscribe Channel) -- A topic delivers each message to all of the topic's consumers, so every consumer gets a copy of every message.
A queue producer is called a QueueSender and a queue consumer is called a QueueReceiver. A topic producer is called a TopicPublisher and a TopicSubscriber is a topic consumer.
So, some quick conversational messaging-speak: An application uses a sender to send a message to exactly one receiver (via a queue), but uses a publisher to broadcast a message to multiple subscribers (via a topic). For more of a quick overview of what messaging is all about, check out the EIP book's introduction.
Now, the next time you're at a dinner party and the conversation turns to messaging, you'll be prepared. You can thank me later.