What are the primary reasons to use Message Oriented Middleware (MOM) in an application today? Why would you install, configure and manage this extra “layer” in your already complex architecture? Why not use HTTP, or sockets, or IIOP, or POP3, or Atom, etc. There are several useful properties that MOM provides, including:
- Asynchronous messaging
- Reliable transactional message delivery (best effort is also supported)
- Publish subscribe (in addition to point to point)
- Decoupling message producers and consumers logically and physically with the ability to route and transform messages as they pass thru
- Support for many programming languages, platforms and network protocols
While some of the aforementioned properties can be gained from HTTP and other protocols, there is no alternative to the MOM when you need #2 (short of using distributed transactions with databases) or when you need a combination of all of the above. If you do not need #2, then arguable MOM still provides benefits over other protocols by the flexibility and the tool support to achieve your messaging goals. Therefore my conclusion is that reliable message delivery is perhaps the most critical quality of the MOM product. This means no duplication of messages, no losses of messages, although it may be ok to have a delay, but eventually you will deliver the messages to its destination(s).
Edison Group recently tested reliability of WebSphereMQ and Apache ActiveMQ under different kinds of power and network failures and recorded their findings in these two videos:
WebSphere MQ failover video:
Apache ActiveMQ failover video:
Here is the summary of the failover tests shown in both videos above:
Some of the findings are documented in the ActiveMQ JIRA and are known in the community.