RabbitMQ

RabbitMQ

RabbitMQ Logo
Basisdaten

Entwickler VMware
Aktuelle Version 4.3.4[1]
(23. Juli 2026)
Betriebssystem Plattformunabhängig
Programmier­sprache Erlang[2]
Kategorie Advanced Message Queuing Protocol Message Oriented Middleware
Lizenz MPL-2.0[3]
www.rabbitmq.com

RabbitMQ ist eine Open Source Message Broker Software, die das Advanced Message Queuing Protocol (AMQP) implementiert. Der RabbitMQ-Server ist in Erlang geschrieben. Die Software wird entwickelt und gepflegt von Rabbit Technologies Ltd, einem Zusammenschluss von LShift und Cohesive FT, die im April 2010 von SpringSource erworben wurde. SpringSource war eine Abteilung von VMware, die im April 2013 in ein neu gegründetes Joint Venture Unternehmen zwischen VMware, EMC Corporation und General Electric mit Namen Pivotal Software Inc. ausgegliedert wurde.[4]

Beispiele

Dieser Abschnitt zeigt Programmbeispiele in Python:

Senden

Das folgende Programm baut eine Verbindung auf, stellt die Existenz der Empfänger-Warteschlange sicher, sendet die Nachricht und schließt die Verbindung:

#!/usr/bin/env python3
import pika
connection = pika.BlockingConnection(pika.ConnectionParameters('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()

Empfangen

Entsprechend empfängt das folgende Programm Nachrichten aus der Warteschlange und gibt deren Inhalt auf dem Bildschirm aus:

#!/usr/bin/env python3
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()

Einzelnachweise

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.