Skip to navigation

Subscriptions

Use subscriptions when external consumers need to receive events emitted by a published app.

Webhook delivery

Webhook subscriptions POST matching runtime events to a configured HTTPS endpoint. When the fleet-wide durable rollout is explicitly enabled, compatible webhooks are committed to an outbox in the same database transaction as the source event, then claimed by competing workers with fenced leases.

Treat delivery as at-least-once and make the receiver idempotent. If a timeout, network failure, or uncertain HTTP response happens after external I/O begins, Cessy stops blind retries and marks the delivery for reconciliation because the receiver may already have applied it.

Webhook filters are evaluated before the source event commits. A false filter creates no delivery; an invalid filter prevents the command from committing. Only public HTTPS targets are accepted by the durable worker, redirects are not followed, and protected or credential-bearing inline headers remain on the legacy compatibility path.

Poll delivery

Polling is the simplest integration shape. The consumer periodically asks for events after a cursor and stores the returned cursor after successful processing.

Use polling when:

  • the consumer needs strong retry control
  • network connectivity is intermittent
  • batch processing is acceptable
  • operational simplicity matters more than low latency

SSE delivery

SSE streams events over a long-lived HTTP connection. Use it when consumers need lower latency and can handle reconnect behavior.

Consumers must still persist progress. A live stream is not a substitute for durable processing.

Event selection

Subscriptions should be explicit about event types and target app/environment. Avoid broad event feeds unless the consumer is an audit or replication process.

Choosing poll or SSE

NeedPrefer
Server-to-server event pushWebhook
Simple integration and retriesPoll
Lower latency updatesSSE
Batch processingPoll
Live UI or near-real-time consumerSSE

Failure handling

Consumers should treat event handling as at-least-once. Store cursors after processing and make side effects idempotent. For webhook delivery, an ambiguous result requires an operator or provider-specific lookup before retrying.