Message-Oriented Communication

Message-oriented communication is a way of communicating between processes. Messages, which correspond to events, are the basic units of data delivered. Tanenbaum and Steen classified message-oriented communication according to two factors---synchronous or asynchronous communication, and transient or persistent communication. In synchronous communication, the sender blocks waiting for the receiver to engage in the exchange. Asynchronous communication does not require both the sender and the receiver to execute simultaneously. So, the sender and recipient are loosely-coupled. The amount of time messages are stored determines whether the communication is transient or persistent. Transient communication stores the message only while both partners in the communication are executing. If the next router or receiver is not available, then the message is discarded. Persistent communication, on the other hand, stores the message until the recipient receives it.

A typical example of asynchronous persistent communication is Message-Oriented Middleware (MOM). Message-oriented middleware is also called a message-queuing system, a message framework, or just a messaging system. MOM can form an important middleware layer for enterprise applications on the Internet. In the publish and subscribe model, a client can register as a publisher or a subscriber of messages. Messages are delivered only to the relevant destinations and only once, with various communication methods including one-to-many or many-to-many communication. The data source and destination can be decoupled under such a model.

The Java Message Service (JMS) from Sun Microsystems provides a common interface for Java applications to MOM implementations. Since JMS was integrated with the recent version of the Java 2 Enterprise Edition (J2EE) platform, Enterprise Java Beans (EJB)---the component architecture of J2EE---has a new type of bean, the message-driven bean. The JMS integration simplifies the enterprise development, allowing a decoupling between components.

From Jungkee Kim's dissertation