Liking cljdoc? Tell your friends :D
Clojure only.

idem.inbox

Inbox Core Module: Handles idempotent consumption and crash recovery.

Delegates state management to an InboxStore (defaulting to Postgres).

Inbox Core Module: Handles idempotent consumption and crash recovery.

Delegates state management to an `InboxStore` (defaulting to Postgres).
raw docstring

with-idempotencyclj

(with-idempotency ds consumer message-id opts handler)

Inbox Idempotency Wrapper.

Executes the handler ONLY if the message is seen for the first time, or if a previous processing attempt crashed (lease expired).

Parameters: ds - Database DataSource (used for default Postgres store). consumer - Consumer Group ID (String). message-id - Unique Message ID (String). opts - Config (optional): :ttl-ms Lease duration in ms (default 300000). :table-name Table name (default :idem_inbox_messages). handler - No-arg function containing business logic.

Returns: :processed - Successfully executed. :skipped - Duplicate message detected and skipped. :failed - Execution threw an exception.

Inbox Idempotency Wrapper.

Executes the handler ONLY if the message is seen for the first time,
or if a previous processing attempt crashed (lease expired).

Parameters:
  ds         - Database DataSource (used for default Postgres store).
  consumer   - Consumer Group ID (String).
  message-id - Unique Message ID (String).
  opts       - Config (optional):
    :ttl-ms     Lease duration in ms (default 300000).
    :table-name Table name (default :idem_inbox_messages).
  handler    - No-arg function containing business logic.

Returns:
  :processed - Successfully executed.
  :skipped   - Duplicate message detected and skipped.
  :failed    - Execution threw an exception.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close