RabbitMQ

RabbitMQ
Developer(s) Pivotal Software
Stable release
3.6.5 / August 5, 2016 (2016-08-05)
Written in Erlang
Operating system Cross-platform
Type AMQP, message-oriented middleware
License Mozilla Public License
Website www.rabbitmq.com

RabbitMQ is open source message broker software (sometimes called message-oriented middleware) that implements the Advanced Message Queuing Protocol (AMQP). The RabbitMQ server is written in the Erlang programming language and 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.

History

Rabbit Technologies Ltd., originally developed RabbitMQ. Rabbit Technologies started as a joint venture between LShift and CohesiveFT in 2007,[1] and was acquired in April 2010 by SpringSource, a division of VMware.[2] The project became part of Pivotal Software in May 2013.[3]

The source code is released under the Mozilla Public License. The project consists of:

Examples

This section gives sample programs written in Python 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 python
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()

Receiving

Similarly, the following program receives messages from the queue and prints them on the screen:

#!/usr/bin/env python
import pika
connection = pika.BlockingConnection(pika.ConnectionParameters(host='localhost'))
channel = connection.channel()
channel.queue_declare(queue='hello')
print(' [*] Waiting for messages. To exit press CTRL+C')
def callback(ch, method, properties, body):
    print(" [x] Received %r" % body)
channel.basic_consume(callback, queue='hello', no_ack=True)
channel.start_consuming()

See also

References

  1. "Launch of RabbitMQ Open Source Enterprise Messaging" (PDF). Press release. February 8, 2007. Retrieved October 23, 2013.
  2. "Rabbit Technologies announce acquisition by SpringSource". Press release. April 13, 2010. Archived from the original on April 18, 2010. Retrieved October 3, 2013.
  3. "Proudly part of Pivotal". Press release. May 14, 2010. Archived from the original on June 2, 2013. Retrieved October 3, 2013.

"What is Rabbit MQ, Why to use and How to Install"

Further reading

This article is issued from Wikipedia - version of the 9/13/2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.