class
Crabbit::ProducerOptions
- Crabbit::ProducerOptions
- Reference
- Object
Overview
Configures publisher batching, confirms, filtering, backpressure, and recovery.
Defined in:
crabbit/options.crConstructors
Instance Method Summary
-
#batch_delay : Time::Span
Returns how long the batch worker waits for more messages.
-
#batch_size : Int32
Returns the maximum number of logical messages collected per wire batch.
-
#compression : Compression
Returns the compression used for sub-entry batches.
-
#confirm_timeout : Time::Span
Returns the default publisher-confirmation timeout.
-
#enqueue_timeout : Time::Span | Nil
Returns the optional timeout for waiting on backpressure capacity.
-
#filter_value_extractor : Proc(Message, String | Nil) | Nil
Returns the optional server-side filter value extractor.
-
#max_unconfirmed : Int32
Returns the hard limit of publishes awaiting confirmation.
-
#name : String | Nil
Returns the optional publisher reference used for broker deduplication.
-
#on_state_change : Proc(ResourceEvent, Nil) | Nil
Returns the optional asynchronous lifecycle listener.
-
#recovery_policy : RecoveryPolicy
Returns the reconnect backoff policy.
-
#retry_on_recovery : Bool
Returns whether unresolved messages are republished after recovery.
-
#sub_entry_size : Int32
Returns the number of logical messages packed into each sub-entry.
Constructor Detail
Creates publisher options.
A non-nil name enables broker-side publishing-ID deduplication and sequence recovery. batch_size controls ordinary wire batching; sub_entry_size greater than one packs logical messages into compressed sub-entries. Filtering and sub-entry batching cannot be combined.
max_unconfirmed applies backpressure. With no enqueue_timeout, the publishing fiber waits indefinitely for capacity. confirm_timeout limits how long an unresolved publish remains pending. When retry_on_recovery is true, pending messages are sent again after the publisher reconnects.
Instance Method Detail
Returns the optional timeout for waiting on backpressure capacity.
Returns the optional server-side filter value extractor.
Returns the optional asynchronous lifecycle listener.