RabbitMQ Topology
Tarasol uses RabbitMQ as its primary asynchronous messaging backbone. Services publish events to exchanges and consume from queues to enable decoupled, event-driven communication.
Exchange Overview
RabbitMQ Exchange and Queue Topology
Loading diagram...
Exchanges
| Exchange | Type | Purpose |
|---|---|---|
identity_events | TOPIC | User account lifecycle events |
session_manager | TOPIC | Session creation/destruction events |
messages | TOPIC | Notification routing events |
ws_exchange | FANOUT | WebSocket broadcast events |
dlx_exchange | FANOUT | Dead letter exchange for failed messages |
structure_entities_events | FANOUT | Organization structure change events |
search-events | TOPIC | Search indexing events |
Queues
| Queue | Consumer | Purpose |
|---|---|---|
| Multitenancy | Tenant Service | Tenant config events |
| CMS | CMS Service | Content and structure events |
| Administration | Admin Service | Session and permission events |
| Notifications | Notification Service | Notification delivery events |
| Electronic | Electronic Service | External correspondence events |
| AuditTrail | Audit Service | Audit log events |
| NotificationsDLQ | — | Failed notification retry |
Key Routing Patterns
| Routing Key | Publisher | Consumer |
|---|---|---|
notify.delegation_created.requested | Admin | Notification |
notify.delegation_cancelled.requested | Admin | Notification |
notify.correspondence_permission_changed.requested | Admin | Notification |
email.otp.requested | Identity | Notification Workers |
session.created | Identity | Admin (Session Manager) |
session.destroyed | Identity | Admin (Session Manager) |
Dead Letter Pattern
Failed messages are routed to the dlx_exchange and consumed by the NotificationsDLQ queue. This ensures no messages are lost and allows for retry processing:
Dead Letter Queue Pattern
Loading diagram...
WebSocket Fanout
The ws_exchange uses FANOUT type to broadcast real-time notifications to all connected WebSocket gateway instances. Each Notification WS service instance binds its own exclusive queue to this exchange.
ℹInfo
All RabbitMQ connection URIs are configured via the RABBITMQ_URIS environment variable. The default format is amqp://guest:guest@localhost:5672.