Introduction to Message Oriented Middleware

Message Oriented Middleware or MOM concept involves the exchange of data between different applications using messages. In a MOM,  messages are usually sent and received asynchronously (as compared to RPC-style communications which tend to be synchronous in nature). Using  this mechanism, applications are decoupled and senders and receivers exist without the knowledge of each other. It becomes the responsibility of the messaging system (Message Oriented Middleware) to transfer the messages between applications.

Message Oriented Middleware: QPID ActiveMQ RabbitMQ OpenAMQ ZeroMQ

Message Oriented Middleware Concepts

Message Structure

A message can have two parts: header and body. The headers are used by both the messaging system and the application developer to provide information about things such as the destination, the message type etc.

The format of the message body depends on messaging implementations. Common formats include plain text, a raw stream of bytes or a XML message that can be understood via XML parsing technologies.


MOM acts as message broker and  manages the connections and channels of communication between multiple clients. It can route, transform, aggregate or store messages.


This is the end point application that is capable of communicating with the Message Oriented Middleware in the format and language that is understood by the broker.

Message Oriented Middleware Communication Models:


This is intended for a one-to-many broadcast of information. Here multiple consumers register to a particular type of message/communication channel. A producer can send the message on that registered channel such that each subscriber receives a copy of that message.


This is intended for a one-to-one communication between two specific applications.


This is intended for distribution of tasks equally among recipients for load balancing.

Standards for Message Oriented Middleware architecture:

Advanced Message Queuing Protocol (AMQP)

AMQP allows vendor neutrality and supports request-response or point to point,publish-and-subscribe and round-robin messaging patterns.

JAVA Messaging Service (JMS)

This  standard allows applications based on the Java 2 Platform, Enterprise Edition (J2EE) to create, send, receive, and read messages. It allows the communication to be loosely coupled, asynchronous and reliable. It supports point to point and publish and subscribe messaging patterns. JMS standard does not define the format of the messages exchanged, so JMS systems are not inter operable.

Apache QPID vs ActiveMQ vs RabbitMQ vs OpenAMQ vs ZeroMQ (Comparing some opensource / Freeware options)

AMQP (Layer 5) TCP/SCTP (Layer 4) C++Clients JAVAClients Persistence HA Transaction Support Load Balancing
Apache QPID Yes TCP Yes Yes Yes Yes Yes Yes
Active MQ No TCP Yes Yes Yes Yes Yes Yes
Rabbit MQ Yes TCP Experimental Yes Yes Yes Yes Being revised
Open AMQ Yes Both Yes Yes No Yes Yes ?
Zero MQ No TCP Yes Yes No ? No ?


Throughput Latency Scalability
Apache QPID 5000 m/s, 1100m/s (P) 60-80us Yes
Active MQ 5000 m/s Info Yes
Rabbit MQ 10k m/s , 3-5k m/s (P) Sub ms Being Revised
Open AMQ 130K messages per second, sustained over ten seconds 185us
Zero MQ Results Results Yes