Message Oriented Middleware, the key behind ESB
Message oriented middleware (MOM), the key behind ESB (Enterprise Service Bus), offers flexibility in application development. MOM permits time-independent responses because it operates in an asynchronous mode.
MOM expands inter-component communication by allowing a client to send a request for service and then continue processing without having to wait for a response. Messaging does not impose the requirement of waiting for a response, as with an RPC. If no response is required, one need not be sent.
MOM products typically have a feature called message queuing. Message queues allow clients and servers to run at different times. All communication happens by either putting messages into or taking messages out of queues.
Two types of message queues exist, store and forward, and publish/subscribe.
1. Store and forward. Messages are stored in a message queue and forwarded to the service as needed. The power of MOM is the ability to support asynchronous communication. Asynchronous communication allows work to be performed whenever applications are ready. MOM resembles doing business through voice mail. Incoming calls are retrieved when it is convenient, they are prioritized, and calls are returned at a convenient time.
2. Publish/subscribe. One application service publishes information. Another application that needs the information subscribes to the published information (i.e., a “push” model). Messages containing the new information is placed in a queue for each subscriber by the publishing application. When a subscriber is ready to receive the new information, it checks for new messages in the message queue. For example, on the Internet, electronic mail users subscribe to services such as special airline rates. When new special rate information is available, the airline publishes the rates and sends messages to each subscriber. Each subscriber then checks mail messages and receives the new message.
Messaging and Queuing is a simple and yet powerful way of integrating between applications. Messages in addition to sending data can be used to send instructions on what needs to be done. More powerful conversations also allow an application to more specifically describe the functions and services it can provide to other applications.
There are other features provided by message oriented middleware that permit increased capabilities in application design:
1. Remote system support. MOM is useful when a network connection is intermittent (e.g., mobile data connections). Messages can be queued until the mobile workstation is connected. Once the workstation connects, queued messages are transferred to their recipients for processing.
2. Prioritization of requests. Throughout any system, some service requests need a higher priority than others. For example, in airline reservations, a canceled seat needs to be rebooked as soon as possible and is therefore of a higher priority than a new reservation. The cancellation is processed at a higher priority, ahead of a booking, so that the seat will be free before the booking request is processed. MOM allows the prioritization of each request.
3. Event-Driven Services. MOM provides more options for starting services on an as needed basis. Commonly used services, (e.g., an account balance service), can be active all the time, processing requests as they arrive. Other services, (e.g., a payroll service), can execute on a periodic basis to process requests.
4. Error Notification. MOM also provides notification of errors in delivering messages. For example, if a message cannot be delivered, MOM has built-in error handling for message delivery.
5. Load Balancing. The asynchronous communication capability of MOM provides more options for scalability and load balancing. For example, if an application system was busy, the message could be forwarded to a parallel process in an alternate location.