class

Crabbit::SuperStreamProducerOptions

Inherits Reference < Object

Configures a SuperStreamProducer and its partition routing.

Constructors

new(routing_key_extractor : Proc(Message, String) | Nil = nil, routing : SuperStreamRouting = SuperStreamRouting::Hash, producer : ProducerOptions = ProducerOptions.new, hash_function : Proc(String, UInt32) | Nil = nil, routing_strategy : Proc(Message, Array(String), Array(String)) | Nil = nil, topology_refresh : Time::Span = 30.seconds)

Creates super-stream producer options.

Supply either routing_key_extractor or routing_strategy. A custom strategy receives the message and current partition names and may return one or more of those partitions. When using SuperStreamRouting::Hash, hash_function can replace the RabbitMQ-compatible default.

Source

Instance methods

hash_function

Returns the optional custom hash function.

Source
producer

Returns options shared by every partition producer.

Source
routing

Returns the built-in routing mode.

Source
routing_key_extractor

Returns the routing-key extractor used by built-in routing.

Source
routing_strategy

Returns the optional custom partition-selection strategy.

Source
topology_refresh

Returns how often cached topology may be refreshed.

Source