Register
Create hooks through the /hooks HTTP routes. A hook stores a name, endpoint, and geofence definition scoped to a collection.
Hooks turn geofence events into outbound webhook jobs. The native server stores hook definitions, enqueue intents, delivery results, retries, and dead-letter state so operators can recover and inspect delivery behavior.
Create hooks through the /hooks HTTP routes. A hook stores a name, endpoint, and geofence definition scoped to a collection.
When a mutation produces a matching geofence event, the command and WebhookEnqueue records are persisted in one atomic storage batch before the mutation becomes visible.
The native outbox leases due jobs up to webhook_concurrency_limit and sends each event as an HTTP POST to http:// or https:// endpoints.
Successful 2xx responses append WebhookAck. Failed attempts append WebhookRetryScheduled or WebhookDeadLetter after the retry budget is exhausted.
webhook_queue_path = "./data/webhook-queue.sqlite"
webhook_timeout_ms = 5000
webhook_concurrency_limit = 128
webhook_retry_count = 8
webhook_retry_initial_backoff_ms = 200
webhook_retry_max_backoff_ms = 30000
webhook_lease_ms = 30000 | Name | Description |
|---|---|
webhook_queue_path | SQLite queue path. Defaults next to the AOF as *.webhooks.sqlite. In memory mode the queue is kept in memory unless a path is set. |
webhook_timeout_ms | Per-attempt HTTP delivery timeout. |
webhook_concurrency_limit | Maximum number of webhook delivery attempts in flight. |
webhook_retry_count | Number of retries after the first attempt. A value of 8 means up to 9 total attempts. |
webhook_retry_initial_backoff_ms | Initial retry delay used by the exponential backoff calculation. |
webhook_retry_max_backoff_ms | Upper bound for retry backoff. |
webhook_lease_ms | Lease duration for in-flight jobs. Expired leases are returned to pending state for another attempt. |
| Signal | Description |
|---|---|
GET /admin/webhook-queue | Admin-only queue summary with pending, leased, dead_letter, and oldest_pending_age_ms fields. |
latlng_hook_attempts_total | Total webhook delivery attempts. |
latlng_hook_success_total | Successful webhook deliveries. |
latlng_hook_failure_total | Failed delivery attempts. |
latlng_hook_retry_total | Attempts that scheduled a retry. |
latlng_hook_dead_letter_total | Deliveries moved to dead-letter state. |
latlng_geofence_eval_errors_total | Geofence evaluations that failed and were skipped without failing the triggering write. |
latlng_expired_objects_total | Objects deleted by the background expiry sweep (each can fire Del events). |
latlng_webhook_jobs_pending | Current pending jobs. |
latlng_webhook_jobs_leased | Current leased jobs. |
latlng_webhook_jobs_dead_letter | Current dead-letter jobs. |
Webhook delivery in latlng is at-least-once. Consumers should deduplicate using the stable event and job identifiers carried as X-LatLng-Event-Id and X-LatLng-Job-Id HTTP headers and in the JSON payload.
AOF-backed servers recover unresolved webhook jobs across restarts. The materialized SQLite queue is rebuilt from the durable primary log on startup. With memory storage the runtime queue file is kept, but durable webhook recovery is not guaranteed because the primary log is ephemeral.
Retries use exponential backoff bounded by webhook_retry_initial_backoff_ms and webhook_retry_max_backoff_ms. webhook_retry_count caps the number of retries after the first attempt, so a value of 8 means up to 9 total attempts before a delivery is dead-lettered.
Yes. The admin endpoint GET /admin/webhook-queue returns a summary with pending, leased, dead_letter, and oldest_pending_age_ms fields. Detailed per-state counters are also exported as Prometheus metrics (latlng_hook_attempts_total, latlng_webhook_jobs_pending, etc.).