RabbitMQ Infrastructure
RabbitMQ is the primary message broker for asynchronous communication between Tarasol microservices. It uses AMQP protocol for reliable message delivery.
Setup
# Docker setup
docker run -d --name rabbitmq \
-p 5672:5672 \
-p 15672:15672 \
rabbitmq:3-management
Default management UI is available at http://localhost:15672 (guest/guest).
Exchange Configuration
| Exchange | Type | Durable | Purpose |
|---|---|---|---|
identity_events | TOPIC | Yes | User lifecycle events |
session_manager | TOPIC | Yes | Session events |
messages | TOPIC | Yes | Notification routing |
ws_exchange | FANOUT | Yes | WebSocket broadcasts |
dlx_exchange | FANOUT | Yes | Dead letter handling |
structure_entities_events | FANOUT | Yes | Org structure changes |
search-events | TOPIC | Yes | Search indexing |
Queue Configuration
| Queue | Durable | DLX | Purpose |
|---|---|---|---|
Multitenancy | Yes | Yes | Tenant events |
CMS | Yes | Yes | Content events |
Administration | Yes | Yes | Admin/session events |
Notifications | Yes | Yes | Notification delivery |
Electronic | Yes | Yes | External correspondence |
AuditTrail | Yes | Yes | Audit log events |
NotificationsDLQ | Yes | No | Failed notification retry |
Dead Letter Configuration
All primary queues are configured with dead letter exchange routing:
{
"x-dead-letter-exchange": "dlx_exchange",
"x-dead-letter-routing-key": "dlq"
}
⚠Warning
Monitor the NotificationsDLQ queue regularly. Messages in this queue represent failed deliveries that need manual inspection or automated retry.
Environment Variables
| Name | Type | Default | Description |
|---|---|---|---|
| RABBITMQ_URIS | string | amqp://guest:guest@localhost:5672 | RabbitMQ connection URI(s) |
| RABBITMQ_PREFETCH | number | 10 | Consumer prefetch count |
| RABBITMQ_HEARTBEAT | number | 60 | Heartbeat interval in seconds |