Liking cljdoc? Tell your friends :D
Clojure only.

idem.outbox

Outbox Core Module: Responsible for writing events within a business transaction.

This namespace acts as a facade over the OutboxStore protocol. By default, it uses the PostgreSQL implementation.

Outbox Core Module: Responsible for writing events within a business transaction.

This namespace acts as a facade over the `OutboxStore` protocol.
By default, it uses the PostgreSQL implementation.
raw docstring

*store*clj

The default OutboxStore implementation. Can be rebound for testing or alternative storage backends.

The default OutboxStore implementation.
Can be rebound for testing or alternative storage backends.
sourceraw docstring

emit!clj

(emit! tx event-map)

Records an event in the current database transaction (Outbox Pattern).

Ensures atomicity between business state changes and event publishing.

Parameters: tx - The active database transaction (e.g., next.jdbc/Connection). event-map - Event details map containing: :aggregate-type (String) :aggregate-id (String/UUID) :event-type (String) :payload (Map) :headers (Map, optional)

Returns: A map containing the generated {:event-id ...}.

Example: (jdbc/with-transaction [tx ds] (create-order! tx ...) (outbox/emit! tx {:aggregate-type 'order' :aggregate-id order-id :event-type 'order.created' :payload {...}}))

Records an event in the current database transaction (Outbox Pattern).

Ensures atomicity between business state changes and event publishing.

Parameters:
  tx        - The active database transaction (e.g., next.jdbc/Connection).
  event-map - Event details map containing:
    :aggregate-type (String)
    :aggregate-id   (String/UUID)
    :event-type     (String)
    :payload        (Map)
    :headers        (Map, optional)

Returns:
  A map containing the generated {:event-id ...}.

Example:
  (jdbc/with-transaction [tx ds]
    (create-order! tx ...)
    (outbox/emit! tx {:aggregate-type 'order'
                      :aggregate-id   order-id
                      :event-type     'order.created'
                      :payload        {...}}))
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