MirrorNest
← Tutte le guide

RabbitMQ

A mature, widely-deployed open-source message broker — decouples different parts of an application by passing messages/jobs between them reliably, instead of having services call each other directly.

Sistema: Any Docker hostmessage-brokerqueueDockerSito ufficiale ↗Documentazione ufficiale ↗
Questa guida è redatta a partire dalla documentazione ufficiale di RabbitMQ, linkata sopra — verifica sempre lì i nomi esatti di pacchetti/versioni prima di eseguire questi comandi su un server di produzione, poiché le versioni della distribuzione e del progetto cambiano nel tempo.
  1. 1Run the image with the management UI enabled

    The '-management' tag variant includes RabbitMQ's browser-based admin dashboard alongside the broker itself.

    docker run -d \ --name rabbitmq \ -p 5672:5672 -p 15672:15672 \ -e RABBITMQ_DEFAULT_USER=admin \ -e RABBITMQ_DEFAULT_PASS=changeme \ -v ./rabbitmq/data:/var/lib/rabbitmq \ --restart unless-stopped \ rabbitmq:3-management
  2. 2Open the management dashboard

    Port 15672 serves a full web UI for creating queues/exchanges, watching message rates, and managing users/permissions.

    http://your-server-ip:15672
  3. 3Connect an application

    Applications connect over AMQP on port 5672 using a client library for their language (pika for Python, amqplib for Node.js, and so on) to publish and consume messages.