From 04dd4d0bb7038d6351420a0b31dc68683348a72e Mon Sep 17 00:00:00 2001 From: Cody Burchell Date: Fri, 12 Jun 2026 15:15:52 -0500 Subject: [PATCH] docs(jetstream_consumers): Document ability to set JetStream consumer configuration --- Readme.adoc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Readme.adoc b/Readme.adoc index fe4f220..4f0c3e0 100644 --- a/Readme.adoc +++ b/Readme.adoc @@ -4,6 +4,7 @@ bougyman :conventional-commits: https://www.conventionalcommits.org/en/v1.0.0/[Conventional Commits] :dry-configurable: https://github.com/dry-rb/dry-configurable[Dry::Configurable] :dry-monads: https://github.com/dry-rb/dry-monads[Dry::Monads] +:jetstream-consumer-config: https://docs.nats.io/nats-concepts/jetstream/consumers#configuration[Jetstream Consumer Configuration] Leopard is a small framework for building concurrent {service-api} workers. It uses `Concurrent::FixedThreadPool` to manage multiple workers in a single process and provides a @@ -116,6 +117,13 @@ class EventConsumer end ---- +Any configuration options available for JetStream consumers can be passed via snakeified keys +in the `consumer` hash, with the exception of `durable_name`, `filter_subject` and `ack_policy`. +`durable_name` and `filter_subject` are both derived from the endpoint, and `ack_policy` is always +set to `explicit`. + +{jetstream-consumer-config} + JetStream handlers receive the same `Rubyists::Leopard::MessageWrapper` as service endpoints. Leopard will: