Table of Contents
Part 1: AMQP and RabbitMQ
Advanced Messaging Queuing Protocol or AMQP, is an open-source Internet or Wire Protocol standard for message queuing communications. It facilitates the encrypted and interoperable messaging between applications and organizations; connecting systems, feeding business processes with the information they need, and reliably transmitting onward the instructions that achieve their goals.
In simpler terms, AMQP is like instant messaging or email, in that it allows applications to send and receive messages. Where AMQP differs enormously, however, is that it allows one application to specify what messages will be received and from where, and how trade-offs are made with respect to security, reliability, and performance.
The protocol is designed for multi-client environments, making it ideal for businesses and organizations where transmission of information is critical. With the aid of a messaging broker, AMQP guarantees powerful data transfer, while allowing the storage of messages in a queue.
Of publishers, consumers and brokers
These capabilities of AMQP are what enable asynchronous communication—the sender and receiver work independently of each other. From the publishers (applications that publish or send the message), also known as producers, messages are sent to the messaging brokers and then routed to the consumers (applications that receive and process the messages).
Consumers need not directly receive the information, process it, and then send acknowledgment; but instead, messages are queued until the consumer application has the capacity to handle them. In the same manner, publishers can continue working without waiting for any confirmation, and therefore, no time is wasted. Applications may act as a publisher/producer, or a consumer, or both.
AMQP was initially conceived by John O’Hara of JP Morgan Chase in 2003 in cooperation with iMatix Corporation. Instead of using it exclusively in the financial sector, however, he decided to make AMQP available to all. Today, it is a collective work freely licensed by many authors and participants who have signed up to the AMQP Working Group. The authors of AMQP are committed to establishing it as an international standard.
Commercially available AMQP Products
There are several open-source message brokers and messaging systems in the market that implement AMQP, with more expected to get on board soon. For now, the list includes:
- Apache Qpid, an Apache project
- Fedora Linux AMQP Infrastructure
- IIT Software's SwiftMQ, an enterprise-grade JMS messaging product
- INETCO's AMQP protocol analyzer
- JORAM, an open asynchronous messaging system
- Kaazing's AMQP Web Client
- Microsoft's Windows Azure Service Bus
- JBoss A-MQ by Red Hat built from Qpid
- StormMQ a cloud-hosted messaging service
- VMware Inc RabbitMQ (also supported by SpringSource)
- MQlight by IBM
Among these, one of the most commonly used AMQP Products is RabbitMQ. We delve more about RabbitMQ and its uses next.
RabbitMQ: An Overview
RabbitMQ is a messaging-queueing software, otherwise known as a message broker or queue manager. It is the software where queues are defined, and to which applications connect in order to transmit or publish messages.
Here is a brief reiteration of the basic message queue architecture described in an earlier section:
- Client applications that create messages are called publishers or producers.
- These messages are then delivered to the broker or the message queue.
- Consumers are the recipient applications that connect to the queue and subscribe to the messages being processed.
- Messages placed onto the queue are stored until the consumer retrieves them.
RabbitMQ is the message broker or queue manager that facilitates the transfer and delivery of messages from producer to consumer. Message queueing software like RabbitMQ allows endpoints to produce and consume messages without having to work around each other. They instead, interact with the queue, enabling faster delivery and more efficient communication.
Current applications of RabbitMQ
RabbitMQ is one of the more popular message brokers and for good reason. It is known to be lightweight, and easy to deploy on-premises and in the cloud. It also runs on all major operating systems.
RabbitMQ is said to have over 35,000 production deployments worldwide. VMWare utilizes it for its virtualization products, and the open-source Rocksteady project uses it, along with complex event processing, to analyze user-defined metrics. The goal is to allow the root-cause diagnosis of breakages in real-time.
The government of India’s UIDAI (Unique Identification Authority of India) has established the largest online identity project in the world, which aims to provide each of India's 1.2 billion residents with a unique identity number. UIDAI uses RabbitMQ to decouple sub-components of its application, allowing it to scale.
Mozilla uses RabbitMQ in Pulse, their in-house eventing and pub-sub bus, while OpenStack, an open-source initiative providing a massively scalable cloud operating system, uses RabbitMQ for messaging. RabbitMQ is also widely used at AT&T Interactive, the local search provider.
Next step, let's use all this knowledge to set up RabbitMQ and actually initialize it in a demo project. So stay tuned for Part 2!