The idempotency key for one delivery, whichever transport delivered it.
Delivery is at-least-once: a provider retry, a sink retry, or a requeued
message can hand the same hook over more than once. Ankusa computes one
tenant-scoped key per hook and ships it (the message's idempotency_key, the
x-ankusa-idempotency-key header); this namespace returns that value. Read
it, do not rebuild it.
For a message or delivery from a node that predates the field, the key is computed from the hook's own fields, by the same rule core uses:
tenant:source:dedupe-key when the dedupe key is non-empty
id otherwise
where the tenant is "default" when there is none. A replay of an older
delivery carries a replay id. The key ignores it by default, so a consumer that
already processed the original drops the replay; one that must reprocess
replays passes {:include-replay true}, which appends #replay:<replay-id>.
Accepts a decoded message (ankusa.sdk.message/decode), a hook
(ankusa.sdk.message/->hook), or parsed headers
(ankusa.sdk.webhook/parse-headers).
The idempotency key for one delivery, whichever transport delivered it.
Delivery is at-least-once: a provider retry, a sink retry, or a requeued
message can hand the same hook over more than once. Ankusa computes one
tenant-scoped key per hook and ships it (the message's `idempotency_key`, the
`x-ankusa-idempotency-key` header); this namespace returns that value. Read
it, do not rebuild it.
For a message or delivery from a node that predates the field, the key is
computed from the hook's own fields, by the same rule core uses:
tenant:source:dedupe-key when the dedupe key is non-empty
id otherwise
where the tenant is `"default"` when there is none. A replay of an older
delivery carries a replay id. The key ignores it by default, so a consumer that
already processed the original drops the replay; one that must reprocess
replays passes `{:include-replay true}`, which appends `#replay:<replay-id>`.
Accepts a decoded message (`ankusa.sdk.message/decode`), a hook
(`ankusa.sdk.message/->hook`), or parsed headers
(`ankusa.sdk.webhook/parse-headers`).(key m)(key m {:keys [include-replay]})The idempotency key for m. With {:include-replay true} a delivery that
carries a replay id gets #replay:<replay-id> appended.
The idempotency key for `m`. With `{:include-replay true}` a delivery that
carries a replay id gets `#replay:<replay-id>` appended.cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |