diff options
| author | Ivar Refsdal <ivar.refsdal@nsd.no> | 2021-09-23 15:00:07 +0200 |
|---|---|---|
| committer | Ivar Refsdal <ivar.refsdal@nsd.no> | 2021-09-23 15:00:07 +0200 |
| commit | 31c8d0fea8014cef040206b5f9e9ba310c45d487 (patch) | |
| tree | 6ef8b0e39c83b089dd5c42f68ffa5f820a8d5b09 | |
| parent | Small fix (diff) | |
| download | fiinha-31c8d0fea8014cef040206b5f9e9ba310c45d487.tar.gz fiinha-31c8d0fea8014cef040206b5f9e9ba310c45d487.tar.xz | |
Document logging and config options
| -rw-r--r-- | README.md | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -3,7 +3,7 @@ An opinionated Datomic queue for building (more) reliable systems. Implements the [transactional outbox](https://microservices.io/patterns/data/transactional-outbox.html) pattern. -Supports retries, backoff and more. +Supports retries, backoff, ordering and more. On-prem only. ## Installation @@ -212,6 +212,12 @@ A queue job will remain in status `:error` once `:max-retries` (default: 100) ha Ideally this will not happen. +### All options + +For an exhaustive list of all configuration options, +see [yq/default-opts](https://github.com/ivarref/yoltq/blob/main/src/com/github/ivarref/yoltq.clj#L21). + + # Regular and REPL usage For a regular system and/or REPL session you'll want to do: @@ -303,6 +309,19 @@ by using the test queue: (is (= {:work 123} (tq/force-retry! :q))))) ``` +## Logging and capturing bindings + +Yoltq can capture and restore dynamic bindings. +It will capture during `yq/put` and restore them when the consumer function +is invoked. This is specified in the `:capture-bindings` settings. +It defaults to `['#taoensso.timbre/*context*]`, +i.e. the [timbre](https://github.com/ptaoussanis/timbre) log context, +if available, otherwise an empty vector. + +These dynamic bindings will be in place when yoltq logs errors, warnings +etc. about failing consumer functions, possibly making troubleshooting +easier. + ## License |
