class
Crabbit::ConsumerOptions
- Crabbit::ConsumerOptions
- Reference
- Object
Overview
Configures subscription position, credit, processing, offset storage, filtering, Single Active Consumer behavior, and recovery.
Defined in:
crabbit/options.crConstructors
Instance Method Summary
-
#auto_store_every : Int32 | Nil
Returns the optional processed-message threshold for automatic offset storage.
-
#auto_store_interval : Time::Span | Nil
Returns the optional interval for automatic offset storage.
-
#buffer_size : Int32
Returns the capacity of the logical delivery queue.
-
#concurrency : Int32
Returns the number of callback-processing fibers.
-
#filters : Array(String)
Returns the server-side filter values.
-
#initial_credit : UInt16
Returns the initial number of broker chunks that may be in flight.
-
#match_unfiltered : Bool
Returns whether messages without a filter value also match.
-
#name : String | Nil
Returns the optional consumer reference used for stored offsets and SAC.
-
#offset : OffsetSpecification
Returns the initial subscription position.
-
#on_consumer_update : Proc(Bool, OffsetSpecification) | Nil
Returns the legacy Single Active Consumer update listener.
-
#on_consumer_update_context : Proc(ConsumerUpdateContext, OffsetSpecification) | Nil
Returns the context-aware Single Active Consumer update listener.
-
#on_state_change : Proc(ResourceEvent, Nil) | Nil
Returns the optional asynchronous lifecycle listener.
-
#recovery_policy : RecoveryPolicy
Returns the reconnect backoff policy.
-
#single_active_consumer : Bool
Returns whether Single Active Consumer semantics are enabled.
-
#subscription_offset : Proc(String, OffsetSpecification) | Nil
Returns the optional per-partition starting-offset resolver.
-
#super_stream : String | Nil
Returns the parent super-stream name added to subscription properties.
-
#topology_refresh : Time::Span
Returns the super-stream partition refresh interval.
-
#validate_crc : Bool
Returns whether Deliver chunk CRC32 values are verified.
Constructor Detail
Creates consumer options.
initial_credit is measured in chunks, while buffer_size is measured in logical messages. Callback consumers use concurrency handler fibers; pull consumers ignore it. Broker filtering accepts multiple OR-matched filters and can optionally include unfiltered messages.
Automatic storage requires name. #auto_store_every stores after a
number of processed deliveries, and #auto_store_interval stores the
latest contiguous processed offset periodically. With Single Active
Consumer enabled, one of the update callbacks may choose the offset each
time the subscription becomes active or inactive.
Instance Method Detail
Returns the optional processed-message threshold for automatic offset storage.
Returns the optional interval for automatic offset storage.
Returns the legacy Single Active Consumer update listener.
Returns the context-aware Single Active Consumer update listener.
Returns the optional asynchronous lifecycle listener.
Returns the optional per-partition starting-offset resolver.
Returns the parent super-stream name added to subscription properties.