Enterprise Messaging

In a lot of enterprise applications, processing of work must be treated as a contractual obligation. Some examples of these can be found in the banking or the telecommunication industries. A customer may request to debit from one account and credit the other, or to buy and sell stock, or to initiate and terminate telephone services. These requests cannot be lost. Any enterprise system that is built for these types of processing tasks should ensure that, as long as the request mechanism's preconditions are satisfied, these requests always succeed.

Messaging is the best technology for these types of enterprise applications. Other communication models lack the features that make message-based models so resilient to failure. We will be covering alternative ways of communication as we advance through the chapter.

Important 

Messaging is a system of asynchronous requests, reports, or events that are used by enterprise applications.

It is an event-driven communications layer that allows enterprise applications — on the same system, the same network, or loosely connected through the Internet — to transfer information as securely as needed and at whatever pace the interacting systems can maintain.

Messages can be written to disk so that they will not be lost if the system fails or goes down. Messages can also be sent or received as part of a transaction. Transactions ensure that messaging operations are coordinated with other work. If a program reads a message but fails before it can complete processing, the message remains to be processed later.

Before we go on, let's identify a few terms that will be important for our messaging discusision:

Important 

A message is a unit of information or data that is sent from a process running on one computer to other processes running on the same or different computers.

A message is a lightweight object consisting of a header and a body. The header contains identification and content-type information. The body contains application data.

Important 

A destination is the concept that encapsulates the addressing information used by a messaging product to locate the endpoint for message delivery. It is not, in itself, an endpoint.

The destination in JMS is either a queue or a topic. We will discuss destinations in more detail when we look at messaging domains later in the chapter. The messaging server, broker, or provider, functions as an intermediary between the requestor and the receiver and acts as the host for the destination.

Important 

A domain is a logical grouping of related destinations.

Setting up domains allows us to group related topics or queues. It allows us to use the same topic or queue name over different domains. A single domain can support a combination of both queues and topics.

Important 

A client is any object, process, or application that makes use of a messaging service.

In the context of messaging, the term "server" refers to the messaging server, broker or provider. Everything else that interacts with the messaging server and relies on its services is referred to as a messaging client.

The figure below diagrammatically captures the definitions for client, message, destination, and domain:

click to expand

As an example, suppose a distributed component wants to send stock quote information to one or more remotely located distributed components. Rather than having to know the exact clients to which it sends messages containing the stock quote, it can establish a destination, either a message queue or a message topic area with the messaging server, and "post" the stock quote with the server, which then distributes the messages to the appropriately registered receiving clients.

Without the messaging server the sending client would have the burden of monitoring whether or not the receiving client is currently connected, whether or not a network failure occurred during the send operation, and so on. The server plays an important role in transparently handling many network-related issues, including reliable message delivery, which can require transaction processing and/or persistent message storage.



Professional JMS
Professional JMS
ISBN: 1861004931
EAN: 2147483647
Year: 2000
Pages: 154

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net