pnclPULSEGet API access

DROP ALERT NOTES

When alerts arrive out of order

Arrival order is a transport artifact. Sort on the alerted timestamp, hold a few seconds for stragglers, and mark the late ones.

Your relay logs an alert stamped 14:32:10 and then, two seconds later, one stamped 14:32:07. Something arrived after something older. That is not a broken feed; it is a batched stream being read by a fast consumer, and the fix is one sort away. But only if you know which clock to trust.

Arrival order is not event order

The stream delivers alerts in batches, each data line an array, as the drop alerts guide documents the shape, checked 2026-11-06. Inside your process, arrival order is whatever the network, the parser and your own queueing produced. Two alerts from the same batch can land in different workers; a retry can re-deliver an older one next to a fresh one.

The alert carries its own ordering key: the alerted field, the Unix timestamp of when the feed detected the drop. That stamp is the market's clock, and it is the only order that means anything downstream.

Sort by the alert's own time

The fix is a buffer with a short memory. Hold each incoming alert for a small window, a few seconds, and release them in alerted order rather than arrival order. The window exists to let stragglers from the same batch arrive; anything within it gets resequenced, anything older than it gets logged as late and still delivered.

Late does not mean discarded. An alert that arrives after its window is still a true event; it just missed its slot in the tidy order. Deliver it marked, because a channel that silently drops late alerts hides the disorder instead of reporting it.

Why order matters more than it looks

A relay that pings on arrival order can show a price falling and then rising and then falling again, when in fact two drops happened and the first simply arrived late. Anyone reading the channel builds a narrative from sequence, and a scrambled sequence writes a scrambled narrative: a reversal that never occurred.

The dedupe layer has the same dependency. If your dedupe keys rely on comparing the new alert with the last seen state, as the dedupe guide builds the state store, an out-of-order arrival can read as a bounce or a re-drop, checked 2026-11-06. Order the inputs before you judge them.

How much order to enforce

A few seconds of buffer covers batch jitter and worker races. More than that buys nothing, because the stream's own freshness is seconds, and a relay that waits a minute to be tidy is a relay that is a minute late every time.

Sort on the alerted stamp, hold briefly, mark the late ones, move on. The stream's order is a transport artifact; the alert's own timestamp is the truth. Build on the truth and the channel reads like the market actually moved.