Tide · Reliability

Deduplication (dedupeKey)

dedupeKey is an optional key on a fact, the sender’s own id for the event, on which ingest deduplicates. A second fact with the same key, the same kind and the same signal name or table is dropped: ingest returns undefined, nothing is stored, and the host receives a fact.deduped event.

Reflex
{
  id: 'provider.record-payment',
  intent: 'Record every payment the provider reports.',
  on: { fact: { signal: 'provider' } },
  effect: {
    name: 'payments.record',
    input: { invoice: { $ref: '$.fact.payload.invoice' } },
  },
}
Fact, ingested twice
{
  kind: 'signal',
  name: 'provider',
  payload: { id: 'evt_1001', invoice: 'in_1001' },
  dedupeKey: 'evt_1001',
}
ingest, delivery by delivery
Return value
{
  kind: 'signal',
  name: 'provider',
  payload: { id: 'evt_1001', invoice: 'in_1001' },
  at: 1793005200000,
  dedupeKey: 'evt_1001',
  depth: 0,
}
Events emitted
['fact.ingested']
Output matches the expected value

Runs in this page on the installed package. The input and the expected output are defined by the example.