Liking cljdoc? Tell your friends :D

d-core.core.messaging.dead-letter.metadata

Helpers for enriching envelopes with standardized DLQ metadata.

The canonical location for DLQ state is:

  • [:metadata :dlq]

This metadata is designed to be portable across sinks (logger/storage/producer) and across replay mechanisms.

Helpers for enriching envelopes with standardized DLQ metadata.

The canonical location for DLQ state is:
- `[:metadata :dlq]`

This metadata is designed to be portable across sinks (logger/storage/producer)
and across replay mechanisms.
raw docstring

enrich-for-deadletterclj

(enrich-for-deadletter envelope
                       {:keys [topic subscription-id runtime source deadletter
                               raw-payload status producer]})

Adds/updates DLQ metadata on envelope.

Inputs:

  • ctx may include:
    • :topic (keyword)
    • :subscription-id (keyword)
    • :runtime (keyword, e.g. :redis/:kafka/:jetstream/:in-memory)
    • :source (map, runtime-specific details like stream/offset/etc)
    • :producer (keyword, producer/client key to route DLQ publishes)
    • :deadletter (effective per-topic dl config; stored as a snapshot)
    • :raw-payload (string/bytes; stored as portable meta)
    • :status (default :eligible)

Returns updated envelope map.

Adds/updates DLQ metadata on `envelope`.

Inputs:
- `ctx` may include:
  - `:topic` (keyword)
  - `:subscription-id` (keyword)
  - `:runtime` (keyword, e.g. :redis/:kafka/:jetstream/:in-memory)
  - `:source` (map, runtime-specific details like stream/offset/etc)
  - `:producer` (keyword, producer/client key to route DLQ publishes)
  - `:deadletter` (effective per-topic dl config; stored as a snapshot)
  - `:raw-payload` (string/bytes; stored as portable meta)
  - `:status` (default :eligible)

Returns updated envelope map.
raw docstring

ensure-envelopeclj

(ensure-envelope x)

Coerces x into an envelope-ish map if it isn't already one.

Coerces `x` into an envelope-ish map if it isn't already one.
raw docstring

payload-hashclj

(payload-hash envelope raw-payload)

Computes a stable payload hash for DLQ identification/deduplication.

Preference order:

  • raw payload (if available)
  • envelope :msg (fallback; stable and transport-agnostic)
Computes a stable payload hash for DLQ identification/deduplication.

Preference order:
- raw payload (if available)
- envelope :msg (fallback; stable and transport-agnostic)
raw docstring

raw-payload-metaclj

(raw-payload-meta payload)

Returns a portable representation for a raw payload.

  • bytes -> {:format :bytes-base64 :data <string>}
  • string -> {:format :string :data <string>}
  • nil -> nil
Returns a portable representation for a raw payload.

- bytes  -> {:format :bytes-base64 :data <string>}
- string -> {:format :string :data <string>}
- nil    -> nil
raw 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