Selegic CRM Docs
ServerPub-Sub

Overview

Event-driven architecture for background processing, tenant provisioning, and data seeding.

The Pub-Sub feature handles asynchronous events in Selegic. It reacts to "Global" events (e.g., new organization) to perform background setup tasks.

Core Responsibilities

  • Tenant Provisioning: Create database schemas when an organization is created
  • Data Seeding: Populate tenant databases with metadata and demo data
  • Asynchronous Decoupling: Return success while infrastructure work continues
  • Idempotency: Ensure valid state even if events are processed twice

Architecture

Located in features/pub-sub:

ComponentPurpose
startConsumerEntry point on server boot
OrganizationCreatedSchema creation, connection mapping
OrganizationSeedInitial data population

Quick Navigation

On this page