Skip to content

API Events

Outreach has no Kafka and no BullMQ. It is an event source over WebSocket only. The single async emission is a real-time INQUIRY_SUBMITTED broadcast to admin observation rooms.

1. Inbound — Kafka

None. Outreach does not run a Kafka consumer.

2. Outbound — Kafka

None. Outreach does not produce Kafka events. Downstream systems that need inquiry data poll the REST API or subscribe over WebSocket.

3. Inbound — BullMQ

None. No queue workers.

4. Outbound — BullMQ

None. No jobs enqueued.

5. WebSocket Emissions

Topic (path)RoomsTriggerEmitter
observation/outreach/inquiry/submittedoutreach/inquiries, outreach/inquiries/{id}POST /inquiries/submit succeedsOutreachSocketEventService.notifyInquirySubmitted()
PropertyValue
Emitter identifieroutreach-ws-emitter (Redis connection name outreach-ws-redis)
BackendRedis-backed WebSocketEmitter (single or cluster via APP_ENV_WEBSOCKET_REDIS_MODE)
Topic builderWebSocketTopics.build({ paths: ['observation','outreach','inquiry','submitted'] })
Room builderWebSocketRooms.build({ paths: ['outreach','inquiries'(, id)] })
DeliveryFire-and-forget; isReady() guard; Promise.allSettled so a failing room does not abort the rest

6. Payload Schemas

ts
// observation/outreach/inquiry/submitted
export interface InquirySubmittedMessage {
  id: string;              // inquiry id (Snowflake)
  type: string;            // InquiryTypes value, e.g. "200_SALES"
  firstName: string;
  lastName: string | null;
  email: string;
  businessName: string | null;
  subject: string | null;
  createdAt: string;       // ISO timestamp
}

Source of truth: packages/outreach/src/components/websocket/socket-event.service.ts. No packages/core/src/models/messages/ entry exists — this is a WS-only payload.

7. Idempotency & Ordering

ChannelDeliveryOrderingRecovery
observation/outreach/inquiry/submittedat-most-once (best-effort, not awaited)nonenone — clients re-fetch via GET /inquiries if they miss an event

The WS emission is intentionally lossy: the inquiry is already persisted before notify runs, so the database is the durable record. A dropped WS event only delays the admin's real-time toast, never loses data.

Proprietary and Confidential. Unauthorized copying, distribution, or use of this software is strictly prohibited.