Applications can use point-to-point and publish/subscribe messaging. These styles of messaging can be used in the following ways: one-way; request and response; one-way and forward.
A publisher supplies information in the form of messages. When a publisher publishes a message, it specifies a topic, which identifies the subject of the information inside the message.
A subscriber is a consumer of the information that is published. A subscriber specifies the topics it is interested in by sending subscription requests to a publish/subscribe broker. The broker receives published messages from publishers and subscription requests from subscribers, and it routes published messages to subscribers. A subscriber receives messages on only those topics to which it has subscribed.
A typical JMS messaging pattern involves a requesting application sending a message to a JMS queue for processing by a messaging service (for example, a message-driven bean). When the requesting application sends the request message, the message identifies another JMS queue to which the service should send a reply message. After sending the request message, the requesting application either waits for the reply message to arrive, or it reconnects later to retrieve the reply message.
These messaging techniques can be combined to produce a variety of asynchronous messaging scenarios.
For more information about these messaging techniques and the Java™ Message Service (JMS), see Sun's Java Message Service (JMS) specification documentation (http://developer.java.sun.com/developer/technicalArticles/Networking/messaging/).
For more information about message-driven bean and inbound messaging support, see Sun's Enterprise JavaBeans™ specification (http://java.sun.com/products/ejb/docs.html).
For information about JCA inbound messaging processing, see Sun's J2EE Connector Architecture specification (http://java.sun.com/j2ee/connector/download.html).