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

ExchangeTypePurpose
identity_eventsTOPICUser account lifecycle events
session_managerTOPICSession creation/destruction events
messagesTOPICNotification routing events
ws_exchangeFANOUTWebSocket broadcast events
dlx_exchangeFANOUTDead letter exchange for failed messages
structure_entities_eventsFANOUTOrganization structure change events
search-eventsTOPICSearch indexing events

Queues

QueueConsumerPurpose
MultitenancyTenant ServiceTenant config events
CMSCMS ServiceContent and structure events
AdministrationAdmin ServiceSession and permission events
NotificationsNotification ServiceNotification delivery events
ElectronicElectronic ServiceExternal correspondence events
AuditTrailAudit ServiceAudit log events
NotificationsDLQFailed notification retry

Key Routing Patterns

Routing KeyPublisherConsumer
notify.delegation_created.requestedAdminNotification
notify.delegation_cancelled.requestedAdminNotification
notify.correspondence_permission_changed.requestedAdminNotification
email.otp.requestedIdentityNotification Workers
session.createdIdentityAdmin (Session Manager)
session.destroyedIdentityAdmin (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.