Crabbit::ProducerOptions
Configures publisher batching, confirms, filtering, backpressure, and recovery.
Constructors
new(name : String | Nil = nil, batch_size : Int32 = 100, sub_entry_size : Int32 = 1, compression : Compression = Compression::None, max_unconfirmed : Int32 = 10000, batch_delay : Time::Span = 100.milliseconds, confirm_timeout : Time::Span = 30.seconds, enqueue_timeout : Time::Span | Nil = nil, retry_on_recovery : Bool = true, filter_value_extractor : Proc(Message, String | Nil) | Nil = nil, recovery_policy : RecoveryPolicy = RecoveryPolicy.new, on_state_change : Proc(ResourceEvent, Nil) | Nil = nil)
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.