# RabbitMQ

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/RabbitMQ
> Markdown URL: https://mediated.wiki/source/RabbitMQ.md
> Source: https://en.wikipedia.org/wiki/RabbitMQ
> Source revision: 1319835611
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

{{Short description|Open source message broker}}
{{third-party|date=May 2019}}
{{Infobox software
| name = RabbitMQ
| logo = RabbitMQ logo.svg
| screenshot = 
| caption = 
| developer = [Broadcom](/source/Broadcom)
| latest release version = {{wikidata|property|preferred|references|edit|Q2081413|P348}}
| latest release date = {{wikidata|qualifier|preferred|single|Q2081413|P348|P577}}
| repo = {{URL|https://github.com/rabbitmq}}
| programming language = [Erlang](/source/Erlang_(programming_language))
| operating system = [Cross-platform](/source/Cross-platform)
| genre = [AMQP](/source/Advanced_Message_Queuing_Protocol), [message-oriented middleware](/source/message-oriented_middleware)
| license = [Mozilla Public License](/source/Mozilla_Public_License)
| website = {{URL|https://www.rabbitmq.com}}
}}

'''RabbitMQ''' is an open-source [message-broker](/source/message_broker) software (sometimes called [message-oriented middleware](/source/message-oriented_middleware)) that originally implemented the [Advanced Message Queuing Protocol](/source/Advanced_Message_Queuing_Protocol) (AMQP) and has since been extended with a [plug-in architecture](/source/Plug-in_(computing)) to support [Streaming Text Oriented Messaging Protocol](/source/Streaming_Text_Oriented_Messaging_Protocol) (STOMP), [MQ Telemetry Transport](/source/MQ_Telemetry_Transport) (MQTT), and other protocols.<ref>[https://www.rabbitmq.com/protocols.html Which protocols does RabbitMQ support?]</ref>

Written in [Erlang](/source/Erlang_(programming_language)), the RabbitMQ server is built on the [Open Telecom Platform](/source/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](/source/Mozilla_Public_License).

Since November 2020, there are commercial offerings available of RabbitMQ, for support and enterprise features: "VMware RabbitMQ OVA", "VMware RabbitMQ" and "VMware RabbitMQ for Kubernetes" (different feature levels) <ref>{{cite web |title=VMware RabbitMQ |url=https://www.vmware.com/products/rabbitmq.html |access-date=5 May 2023}}</ref> Open-Source RabbitMQ is also packaged by [Bitnami](/source/Bitnami)<ref>{{Cite web |title=RabbitMQ |url=https://bitnami.com/stack/rabbitmq |access-date=2023-05-08 |website=bitnami.com |language=en-US}}</ref> and commercially for VMware's Tanzu Application Service.

==History==
Originally developed by Rabbit Technologies Ltd. which started as a joint venture between LShift and CohesiveFT in 2007,<ref>{{Cite news |work= Press release |date= February 8, 2007 |title= Launch of RabbitMQ Open Source Enterprise Messaging |url= http://www.rabbitmq.com/resources/RabbitMQ_PressRelease_080207.pdf |access-date= October 23, 2013 }}</ref> RabbitMQ was acquired in April 2010 by [SpringSource](/source/SpringSource), a division of [VMware](/source/VMware).<ref>{{Cite news |work= Press release |date= April 13, 2010 |title= Rabbit Technologies announce acquisition by SpringSource |url=http://www.rabbitmq.com/news.html |url-status=dead |archive-url= https://web.archive.org/web/20100418132113/http://www.rabbitmq.com/news.html |archive-date= April 18, 2010 |access-date= October 3, 2013 }}</ref> The project became part of [Pivotal Software](/source/Pivotal_Software) in May 2013,<ref>{{Cite news |work= Press release |date= May 14, 2010 |title= Proudly part of Pivotal |url=http://www.rabbitmq.com/news.html |url-status=dead |archive-url= https://web.archive.org/web/20130602054940/http://www.rabbitmq.com/news.html |archive-date= June 2, 2013 |access-date= October 3, 2013 }}</ref> which then got acquired back by VMware in December 2019.<ref>{{Cite web |title=VMware Completes Acquisition of Pivotal |url=https://news.vmware.com/releases/vmware-completes-acquisition-of-pivotal |access-date=2023-04-06 |website=VMware News and Stories |date=30 December 2019 |language=en}}</ref>

The project consists of:
*The RabbitMQ exchange server
*Gateways for [AMQP](/source/AMQP), [HTTP](/source/HTTP), [STOMP](/source/Streaming_Text_Oriented_Messaging_Protocol), and [MQTT](/source/MQTT) protocols
*[AMQP](/source/AMQP) client libraries for [Java](/source/Java_(programming_language)), [.NET Framework](/source/.NET_Framework) 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](/source/Python_(programming_language)) (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.

<syntaxhighlight lang="python">
#!/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(" [x] Sent 'Hello World!'")
connection.close()
</syntaxhighlight>

===Receiving===
Similarly, the following program receives messages from the queue and prints them on the screen:
(Note: This example does not [https://pika.readthedocs.io/en/stable/examples/blocking_consume.html acknowledge] receipt of the message.)

<syntaxhighlight lang="python">
#!/usr/bin/env python3
import pika

def callback(ch, method, properties, body):
    print(" [x] 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()
</syntaxhighlight>

==See also==
* [Apache Kafka](/source/Apache_Kafka)
{{Portal|Free and open-source software}}

==References==
{{Reflist}}

==Further reading==
* {{cite web |date=2009-09-13 |author=Joern Barthel |title=Getting started with AMQP and RabbitMQ |publisher=InfoQ |url = http://www.infoq.com/articles/AMQP-RabbitMQ }}
* {{cite web |date=2009-04-09 |author=Peter Cooper |title=RabbitMQ - A Fast, Reliable Queuing Option for Rubyists |publisher=RubyInside |url=http://www.rubyinside.com/rabbitmq-a-fast-reliable-queuing-option-for-rubyists-1681.html }}
* {{cite conference |date=2008-09-25 |title=RabbitMQ: An Open Source Messaging Broker That Just Works |publisher=Google Tech Talks |url=https://google-ukdev.blogspot.com/2008/09/rabbitmq-tech-talk-at-google-london.html }}

==External links==
* {{Official website}}

{{Message-oriented middleware}}

Category:Erlang (programming language)
Category:Free software programmed in Erlang
Category:Message-oriented middleware
Category:Software using the Mozilla Public License
Category:Pivotal Software

---
Adapted from the Wikipedia article [RabbitMQ](https://en.wikipedia.org/wiki/RabbitMQ) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/RabbitMQ?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
