Durable JetStream consumer, executor isolation, timestamped signatures

Featurekamo-shared-library
Ya
15 Mei 2026, 20:48 UTC
Mwandishi
Kamo
Ahadi ya
e8ff33f

Three changes bundled because they all live in WebhookDeliveryWorker and make sense together: 1. Switch from core NATS dispatcher to a JetStream durable push consumer ("los-pipeline-webhook-worker", AckPolicy.Explicit). Restarts replay unacked events; attempt count comes from msg.metaData().deliveredCount() so the WebhookDelivery audit log reflects redelivery rather than an in-process loop. maxDeliver caps redelivery. 2. Dispatch each message to a small ScheduledExecutorService so a slow (10s-timeout) subscriber cannot back up the NATS dispatcher thread. 3. Sign 't.body' (Stripe/GitHub style) and emit headers X-Kamo-Timestamp + X-Kamo-Signature: t=<ts>,v1=<hex> so an eavesdropped request cannot be replayed indefinitely. deliverForOrg is no longer @Transactional: a failed HTTP attempt re-throws so JetStream redelivers, and we want the audit row to persist in its own short transaction rather than rolling back with the outer scope.

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei