Menu

Shipment Fan-Out — Checking Delayed Webhook Payload Formatting Issues
📰

Shipment Fan-Out — Checking Delayed Webhook Payload Formatting Issues

DEV Community: node·ViggoKnight2318·2 days ago
#wf0LnZ48
#devtonodejs#devto#dev#event#delivery
Reading 0:00
15s threshold

TL;DR: validate and normalize a shipment event before it enters a delayed queue, then log the exact schema version and delivery attempt at the fan-out boundary. In a fintech system, that small ordering choice protects latency-sensitive subscribers from malformed payloads without making every consumer rediscover the same rules.

The useful mental model is a two-stage pipeline. Before: accept an arbitrary webhook-shaped object, wait 30 seconds, and discover at delivery time that trackingNumber is nested under a different key. After: turn the inbound event into one canonical envelope, delay that envelope, and send a separately validated delivery payload to each subscriber. The queue schedules work. It should not be the place where meaning is invented.

Where does the formatting failure actually happen?

A delayed webhook has at least three representations: the request received from a carrier, the message stored for later work, and the HTTP body sent to a subscriber.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.