Java Reference
In-Depth Information
tion, Java EE messaging is reliable in the sense that you can be guaranteed that the message
will not be lost en route from the sender to the receiver.
As an analogy, consider the process of contacting someone via phone. If the person answers
the call, then it's synchronous communication. On the other hand, if the person doesn't an-
swer the phone and you leave a voicemail message, it's an asynchronous communication.
The message is stored so that the recipient can listen to it at their convenience. You don't
know when the person will get the message or even who will initially check the message.
The voicemail system can be thought of as a message-oriented middleware (MOM) ser-
vice. It acts as a middleman between the message sender and receiver so that both don't
have to be present simultaneously. In this section, we'll briefly introduce MOM, show how
messaging is used in the ActionBazaar application, and examine three messaging models.
4.1.1. Message-oriented middleware
MOM is software that sends and receives messages reliably between disparate systems. It's
used primarily to integrate different systems, often legacy systems. For example, MOM in-
frastructure software has been used to route messages from a web front end to a system
written in COBOL and running on a mainframe. When a message is sent, the MOM soft-
ware stores the message in a location specified by the sender and acknowledges the receipt.
The message sender is called a producer , and the destination location where the message
is stored is called a destination . At a later point in time, any software component interested
in messages at that particular destination can retrieve the unread messages. The software
components receiving the messages are called the consumers . Figure 4.1 depicts the vari-
ous components of MOM.
Search WWH ::




Custom Search