Web Component

The Web component is a Fastify HTTP server that serves as the entry point for all message generation requests. It receives campaign data, validates it, and publishes messages to the appropriate Pub/Sub topics.

Endpoints

Public (no authentication)

Method Path Description

GET

/healthcheck

Returns { success: true }

GET

/metrics

Prometheus metrics (includes Launcher BullMQ queue gauge)

Escher / mTLS Authenticated

Method Path Description

POST

/api/rti/push

RTI (Real-Time Interaction) push triggers. Converts to aggregator Launch and publishes to sending-tx-<dg>.

POST

/api/trigger

Unified trigger endpoint. Routes to TX (list_id === '0') or batch. Publishes to sending-tx-<dg> or sending-batch-<dg>.

POST

/api/test-message

UI test message sending. Converts to aggregator Launch with source type UI_TEST.

POST

/api/push

Direct push-to-InApp. Generates a delivery message and sends via DeliveryClient or FCM.

GET

/clients-cache/tenants/:tenantId/contacts/:contactId/clients

Fetches device clients for a specific tenant/contact. Accepts appCode query parameter. Uses Effect library.

For a complete API specification see the REST API documentation.

Pub/Sub Topics

The Web component publishes to:

  • sending-tx-<dg> — for transactional messages (RTI push, test messages, TX triggers)

  • sending-batch-<dg> — for batch campaign triggers

The distribution group is determined by the customer’s routing configuration.

Dependencies

  • Pub/Sub: Publishes messages to TX and batch topics

  • me-push: Campaign information

  • Escher: Request authentication (scope and keypool configured via environment variables)

Environment Variables

  • IP, PORT — Server bind address

  • FASTIFY_LOGGING — Logging configuration

  • MG_ESCHER_SCOPE, MG_ESCHER_KEYPOOL — Escher authentication settings

  • LOG_LEVEL — Log verbosity

Code Location