Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
docs(ingress): say an unparseable sweep interval fails the boot
Yudhi Armyndharis7cc7e2c38754
diff --git a/docs/25-integration-fabric.md b/docs/25-integration-fabric.mdindex 09f9ebce0..850ff9ae5 100644--- a/docs/25-integration-fabric.md+++ b/docs/25-integration-fabric.md@@ -239,8 +239,8 @@ route so the lane is one conversation; without it the lane is the whole instancePersist-before-acknowledge alone is not delivery: a crash between the persist and the enqueue, or afire-and-forget enqueue on a `response` route whose outcome is never recorded, would strand the rowwith the provider already acknowledged. The **ingress reconciler** closes that window: every-`INGRESS_RECONCILE_INTERVAL_MS` (default 60s, `0` disables; a blank or unparseable value falls-back to the default rather than disabling the sweep) it re-dispatches a bounded batch+`INGRESS_RECONCILE_INTERVAL_MS` (default 60s, `0` disables; a blank value falls back to the+default, and a negative or unparseable value fails the boot) it re-dispatches a bounded batch(`INGRESS_RECONCILE_BATCH_SIZE`, default 50) of `pending` rows whose last activity is older than agrace period (`INGRESS_RECONCILE_GRACE_MS`, default 60s), through the same queue-or-inline enqueue thelive path uses and with the original delivery id as job id, so a replay is idempotent against a jobdiff --git a/src/modules/integration/ingress-reconciler.service.ts b/src/modules/integration/ingress-reconciler.service.tsindex 1e5c27b06..93d613800 100644--- a/src/modules/integration/ingress-reconciler.service.ts+++ b/src/modules/integration/ingress-reconciler.service.ts@@ -18,8 +18,8 @@ import { createLogger } from '../../common/services/logger.service';import { resolveNonNegativeIntEnv } from '../../config/configuration';export interface IngressReconcilerOptions {- // Sweep cadence. 0 disables the reconciler. A blank or otherwise unparseable value falls back to- // the default rather than disabling the sweep, so a mis-set variable can never silently turn it off.+ // Sweep cadence. 0 disables the reconciler. A blank value falls back to the default; boot validation+ // refuses a negative or unparseable one, so a mis-set variable can never silently turn it off.intervalMs: number;// A 'pending' row only becomes sweep-eligible once its last activity (creation or latest attempt)// is older than this — the live path gets the whole window to record its own outcome first.diff --git a/src/modules/message/pending-message-reaper.service.ts b/src/modules/message/pending-message-reaper.service.tsindex 2be23fcb2..e4ab33c06 100644--- a/src/modules/message/pending-message-reaper.service.ts+++ b/src/modules/message/pending-message-reaper.service.ts@@ -7,9 +7,9 @@ import { createLogger } from '../../common/services/logger.service';import { resolveNonNegativeIntEnv } from '../../config/configuration';export interface PendingMessageReaperOptions {- // Sweep cadence. 0 disables the reaper (mirrors INGRESS_RECONCILE_INTERVAL_MS). A blank or- // otherwise unparseable value falls back to the default rather than disabling the sweep, so a- // mis-set variable can never silently turn the reaper off.+ // Sweep cadence. 0 disables the reaper (mirrors INGRESS_RECONCILE_INTERVAL_MS). A blank value+ // falls back to the default; boot validation refuses a negative or unparseable one, so a mis-set+ // variable can never silently turn the reaper off.intervalMs: number;// An outgoing PENDING row only becomes reap-eligible once it is older than this — the live send// path gets the whole window to persist its own SENT/FAILED outcome first.