Liking cljdoc? Tell your friends :D

Change Log

All notable changes to this project will be documented in this file. This change log follows the conventions of keepachangelog.com.

Unreleased

0.7.0 - 2026-11-29

This is a big release with lots of changes. Read the notes carefully if upgrading!

Added

  • Consumer status includes :listening?: whether the consumer's listener is currently LISTENing on its topic (always false for poll-only consumers).
  • start-listener: a LISTEN connection that many consumers can share. Like consumers, listeners support status (:state, :connected?, :listening?, :topics, :reconnects), graceful-shutdown, and shutdown-await.
  • start-standalone-consumer: start a consumer with a listener of its own. start-consumer is an alias for it.
  • start-listening-consumer: start a consumer on a shared listener.
  • start-poll-only-consumer: start a poll-only consumer, with no LISTEN connection.
  • Consumer option :scheduler: poll on a ScheduledExecutorService you supply (and that ottla won't shut down).
  • start-listener option :executor: run the listener on an ExecutorService you supply (and that ottla won't shut down).
  • append! and append-one! accept a topic map (as returned by add-topic!, ensure-topic, or list-topics) in place of a topic name, skipping the per-call topic lookup.

Fixed

  • Consumers could permanently skip records when producers committed out of eid order (e.g. a transaction holding eid 10 open while another committed eid 11). Appends to a topic are now serialized by a per-topic advisory lock taken in a BEFORE INSERT statement trigger, so eid order matches commit order.

Changed

  • (BREAKING) Topics now NOTIFY on a single channel, ottla, with the payload <topic>:<eid>, instead of on a channel named after the topic. A listener LISTENs once and routes notifications by topic, so a consumer joining a running listener is listening immediately. Run init! after upgrading to update the trigger function; until then, existing topics notify the old way and consumers fall back to polling for them. Consumers from earlier versions don't receive the new notifications either, so upgrade them together.
  • The default :listen-min-ms is now 10 (previously 2), for both a consumer's own listener and start-listener. Right after a notification, the listener checks for more every 10ms instead of every 2ms, which is much less noisy under steady traffic, at the cost of up to ~8ms more latency on a burst's follow-up records. Pass :listen-min-ms 2 to keep the old behavior.
  • start-consumer no longer waits for its listener to be listening before returning. Instead, a consumer fetches when its listener starts (or resumes) listening on its topic, so records appended in between aren't missed.
  • README: corrected the delivery guarantees. The default :auto commit mode is at-most-once (the offset is committed before the handler runs), not at-least-once as previously documented. Added guidance on choosing between :auto, :tx-wrap, and :manual.
  • Appends to the same topic now block each other until the appending transaction ends. Run init! after upgrading to add the trigger to existing topics.

0.6.0 - 2026-11-22

Added

  • Consumer option :listen-min-ms (default 2): delay between LISTEN checks right after a notification
  • Consumer option :listen-max-ms (default 250): maximum delay between LISTEN checks while idle

Changed

  • (BREAKING) Consumer listener now uses adaptive backoff instead of a fixed-interval busy-loop: the delay between LISTEN checks starts at :listen-min-ms, doubles while idle up to :listen-max-ms, and resets on any notification. Idle consumers wake ~4x/sec instead of ~500x/sec, but the first record after a quiet period may take up to :listen-max-ms to be picked up.
  • (BREAKING) :listen-ms is now an alias for :listen-max-ms (previously the fixed check interval). Use :listen-min-ms and :listen-max-ms with the same value to keep a fixed interval.
  • Update pg2 dependency to 0.1.52

0.5.0 - 2026-03-24

Added

  • New function ottla.core/ensure-subscription
  • New function ottla.core/add-subscription! for explicit subscription creation
  • New function ottla.core/remove-subscription! to delete a consumer group subscription

Changed

  • (BREAKING) (status consumer) now returns a map with :state, :topic, :group, :record-count, and :last-processed-at
  • (BREAKING) append! and append-one! now return the largest eid inserted
  • (BREAKING) commit-offset! and reset-consumer-offset! now return a boolean indicating whether the subscription was updated
  • (BREAKING) reset-consumer-offset! now effectively nullifies updated_at for more consistent reporting
  • (BREAKING) Use :selections options instead of :topics for list-subscriptions and topic-subscriptions
  • More descriptive names for consumer threads
  • Update pg2 dependency

0.4.0 - 2026-03-21

Added

  • New function ottla.core/trim-topic! for log retention and cleanup
  • New function ottla.core/list-subscriptions
  • Add :index-key? option for add-topic! and ensure-topic (with default false)
  • Add :max-records option to consumer to cap batch size (with default 100)
  • Promote ottla.core/topic-subscriptions to the public API
  • Update the optional specs

Changed

  • Track :updated-at field in subscriptions
  • Consumer now uses clojure.tools.logging instead of println for warnings and errors

0.3.3 - 2026-03-02

Added

  • New function ottla.core/ensure-topic for idempotent topic creation

Changed

  • Update pg2 dependency

0.3.2 - 2025-05-17

Added

  • Add specs for core api

Changed

  • Update pg2 dependency
  • Use column-specific default serializers (rather than always identity)

Fixed

  • Remove reflection of Thread/sleep (via a function)

0.3.1 - 2025-04-08

Added

  • Expose helper method for making deserializer xform
  • Add topic-subscriptions for getting summaries of subscriptions to topics and their offsets.
  • Topics can be any legal Clojure identifier, not just snake_case names

Fixed

  • Don't increment subscriptions sequence when ensuring
  • Topic removal correctly removes the underlying table again

0.3.0 - 2025-04-01

Added

  • Expose commit-offset! for manual commit mode
  • Add reset-consumer-offset! to do "rewind"

Changed

  • Wait (up to 100ms) for consumer to establish listen before returning

Fixed

  • Ensure all built-in serializers are loaded
  • Stop warning on reflection of Thread/sleep

0.2.0 - 2025-03-30

Changed

  • (BREAKING) Change :val-type to :value-type in parameters for consistency

0.1.1 - 2025-03-24

Changed

  • (BREAKING) Change ottla.core/append to ottla.core/append! to make naming convention.

Added

  • Add some documentation
  • Improve build system

0.1.0 - 2025-03-22

Initial public release

Can you improve this documentation?Edit on GitHub

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