Event Bus & Queue Management
Uniconnect relies on an asynchronous event-driven architecture powered by Redis BullMQ and Moleculer Event Listeners to decouple ingestion, campaign scheduling, and rule triggers.
1. Queue Architecture
mermaid flowchart LR Source["API Gateway / 3CX Socket"] --> EventBus["Moleculer Event Bus"] EventBus --> RedisQueue[("Redis BullMQ Queues")] RedisQueue --> Workers["Background Workers"] Workers --> DB[("PostgreSQL")]
2. Standard Queues
- call-events-queue: Ingests raw call start, segment, transfer, and termination events.
- campaign-dialer-queue: Manages outgoing batch dialing triggers and rate limits.
otification-queue**: Dispatches WebSocket, SMS, and webhook notifications.
- udit-log-queue: Asynchronously persists user audit trails without blocking HTTP threads.