DestinationsOverview

Destinations

Destinations are Causet’s outbound delivery platform. After the runtime commits an intent to the ledger, matched events are delivered to external systems (Kafka, HTTP webhooks) or to connected realtime clients (WebSocket / SSE) through a durable job engine in causet-realtime.

Destinations replace the older Settings → Webhooks configuration. Configure outbound HTTP, Kafka, and websocket delivery under Settings → Destinations. Inbound provider webhooks (provider → your app → submitIntent) are a separate pattern — see Use Webhooks to Update Existing Flows.


Why destinations exist

Runtime commit must stay local to Postgres (ledger + snapshots + cursor). Calling customer brokers or HTTP endpoints inside that transaction would:

  1. Hold entity locks across unpredictable external latency
  2. Couple commit success to customer infrastructure availability
  3. Force the runtime to hold customer credentials

So Causet commits first, then delivers asynchronously.


Three planes

PlaneServiceOwns
Runtimecauset-runtime-serviceLedger commit + publish of a versioned committed-event envelope to internal Kafka. Never opens customer connections or stores customer broker/webhook secrets.
Control planeCauset Cloud (SaaS + UI)Destination resources, subscriptions, config versions, secret references, test connection, Delivery Log, pause/resume, credential rotation.
Data planecauset-realtimeMatch subscriptions → persist delivery jobs → run adapters (Kafka / webhook / websocket) with retries, leases, and Delivery Log.
Runtime ledger commit
  → internal Kafka (causet.committed-events.v1)
    → causet-realtime outbound engine
      → match subscriptions → event_delivery_jobs
      → adapters
           ├─ kafka   → your brokers / topic
           ├─ webhook → your HTTPS endpoint
           └─ websocket → connected SSE / WebSocket clients

Adapter types (today)

TypeUse when
KafkaYou want durable export into a customer-managed cluster (Confluent, MSK, self-hosted).
WebhookYou want Causet to POST committed events to your HTTPS endpoint (replaces legacy managed webhooks).
WebsocketYou want interactive client fan-out via the same job engine (SDK connectStream / SSE).

Additional adapters (EventBridge, SQS, Pub/Sub, …) are on the roadmap; they plug into the same destination registry without runtime changes.


Destinations vs live streams

Destinations (Kafka / webhook)Live SSE / WebSocket
PurposeDurable export / HTTP callbacksInteractive UI updates
DurabilityJobs + retries + Delivery LogBest-effort to connected clients
ConfigSettings → DestinationsSDK connectStream / WS protocol
DedupeRequired (causet-event-id / body id)Client-side optional

When outbound is enabled, websocket destinations feed the local hub so clients are not double-notified from a separate patches consumer.


Quick start

  1. Open Settings → Destinations in Causet Cloud (or the local control plane).
  2. Create a Kafka or Webhook destination for your fork / environment.
  3. Add a subscription with event-type patterns (e.g. order.* or *).
  4. Use Test connection, then watch the Delivery Log.
  5. In your consumer / webhook handler, dedupe on body id (Kafka header causet-event-id, webhook X-Causet-Event-Id).

See:


Permissions & secrets

  • Cloud permission: platform:write (or destinations:* scopes)
  • Secrets are encrypted with CAUSET_SECRETS_MASTER_KEY (shared by SaaS and realtime)
  • APIs never return stored secret values after create (passwordConfigured: true)