SkilldexAll articles

Deduplicate asynchronous skill callbacks

Handle repeated notifications without applying the same change twice.

A provider can send the same callback several times after a slow acknowledgement or a reconnect. Treat callback delivery as a repeated observation of an operation. Processing should preserve the authoritative state once without discarding a genuinely new transition.

Identify events according to the provider contract

Use the event identity and source where the protocol defines that combination. Scope deduplication to the correct tenant or integration. Keep the association with the known operation and verify the message through approved adapter logic before storing a result.

Respect valid reordering

A completion message can arrive before an older progress event. Define which state transitions are allowed and when you should reread the authoritative operation. Arrival order alone is weak evidence for reversing a terminal state. Record delivery attempts for diagnostics without granting them business meaning.

Make acknowledgement consistent with persistence

Acknowledge according to the provider’s contract after the application has safely handled the event or made its status recoverable. Test repeated delivery, replay after restart, and two workers receiving the same event concurrently. Verify related side effects remain singular.

Sources