HOME

TheInfoList



OR:

RabbitMQ is an open-source message-broker software (sometimes called message-oriented middleware) that originally implemented the
Advanced Message Queuing Protocol The Advanced Message Queuing Protocol (AMQP) is an open standard An open standard is a standard that is openly accessible and usable by anyone. It is also a prerequisite to use open license, non-discrimination and extensibility. Typically, anybo ...
(AMQP) and has since been extended with a plug-in architecture to support
Streaming Text Oriented Messaging Protocol Simple (or Streaming) Text Oriented Message Protocol (STOMP), formerly known as TTMP, is a simple text-based protocol, designed for working with message-oriented middleware (MOM). It provides an interoperable wire format that allows STOMP clien ...
(STOMP),
MQ Telemetry Transport MQTT (originally an initialism of MQ Telemetry Transport) is a lightweight, publish-subscribe, machine to machine network protocol for Message queue/Message queuing service. It is designed for connections with remote locations that have devices ...
(MQTT), and other protocols. Written in Erlang, the RabbitMQ server is built on the Open Telecom Platform framework for clustering and failover. Client libraries to interface with the broker are available for all major programming languages. The source code is released under the Mozilla Public License.


History

Originally developed by Rabbit Technologies Ltd. which started as a joint venture between LShift and CohesiveFT in 2007, RabbitMQ was acquired in April 2010 by
SpringSource Spring (previously known as SpringSource) was the company created by the founders of the Spring Framework (a programming model for enterprise Java applications) to support and develop Spring and related projects. Originally incorporated as Inte ...
, a division of VMware. The project became part of Pivotal Software in May 2013. The project consists of: *The RabbitMQ exchange server *Gateways for
AMQP The Advanced Message Queuing Protocol (AMQP) is an open standard application layer protocol for message-oriented middleware. The defining features of AMQP are message orientation, queuing, routing (including point-to-point and publish-and-subsc ...
,
HTTP The Hypertext Transfer Protocol (HTTP) is an application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web, w ...
, STOMP, and MQTT protocols *
AMQP The Advanced Message Queuing Protocol (AMQP) is an open standard application layer protocol for message-oriented middleware. The defining features of AMQP are message orientation, queuing, routing (including point-to-point and publish-and-subsc ...
client libraries for Java,
.NET Framework The .NET Framework (pronounced as "''dot net"'') is a proprietary software framework developed by Microsoft that runs primarily on Microsoft Windows. It was the predominant implementation of the Common Language Infrastructure (CLI) until bein ...
and Erlang. (AMQP clients for other languages are available from other vendors.) *A plug-in platform for extensibility, with a predefined collection of supported plug-ins, including: **A "Shovel" plug-in that takes care of moving or copying (replicating) messages from one broker to another. **A "Federation" plug-in that enables efficient sharing of messages between brokers (at the exchange level). **A "Management" plug-in that enables monitoring and control of brokers and clusters of brokers.


Examples

This section gives sample programs written in
Python Python may refer to: Snakes * Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia ** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia * Python (mythology), a mythical serpent Computing * Python (pr ...
(using the ''pika'' package) for sending and receiving messages using a queue.


Sending

The following code fragment establishes a connection, makes sure the recipient queue exists, then sends a message and finally closes the connection. #!/usr/bin/env python3 import pika connection = pika.BlockingConnection(pika.ConnectionParameters(host="localhost")) channel = connection.channel() channel.queue_declare(queue="hello") channel.basic_publish(exchange="", routing_key="hello", body="Hello World!") print(" Sent 'Hello World!'") connection.close()


Receiving

Similarly, the following program receives messages from the queue and prints them on the screen: (Note: This example does no
acknowledge
receipt of the message.) #!/usr/bin/env python3 import pika def callback(ch, method, properties, body): print(" Received %r" % body) connection = pika.BlockingConnection(pika.ConnectionParameters(host="localhost")) channel = connection.channel() channel.queue_declare(queue="hello") print(" Waiting for messages. To exit press Ctrl+C") channel.basic_consume(queue="hello", on_message_callback=callback) channel.start_consuming()


See also

*
Apache Kafka Apache Kafka is a distributed event store and stream-processing platform. It is an open-source system developed by the Apache Software Foundation written in Java and Scala. The project aims to provide a unified, high-throughput, low-latency plat ...


References


Further reading

* * *


External links

* {{Message-oriented middleware Erlang (programming language) Free software programmed in Erlang Message-oriented middleware Software using the Mozilla license Pivotal Software