class
Crabbit::SuperStreamProducer
- Crabbit::SuperStreamProducer
- Reference
- Object
Overview
Routes publishes across the current partitions of a RabbitMQ super stream.
Partition producers are created lazily and share
SuperStreamProducerOptions#producer. Topology is refreshed on schedule and
after routing failures.
Defined in:
crabbit/super_stream.crConstructors
-
.new(environment : Environment, super_stream : String, options : SuperStreamProducerOptions)
Creates a super-stream producer and resolves its initial topology.
Instance Method Summary
-
#close : Nil
Idempotently closes all partition producers.
-
#options : SuperStreamProducerOptions
Returns routing and partition-producer options.
-
#publish(message : Message, routing_key : String | Nil = nil) : SuperStreamPublishHandle
Routes and publishes an AMQP message.
-
#publish(message : Message, routing_key : String | Nil = nil, &callback : Confirmation -> ) : SuperStreamPublishHandle
Routes and publishes an AMQP message, invoking the block for each selected partition's confirmation.
-
#publish(message : RawMessage | Bytes | String, routing_key : String) : SuperStreamPublishHandle
Routes and publishes raw, byte, or string payloads using an explicit key.
-
#super_stream : String
Returns the logical super-stream name.
Constructor Detail
Creates a super-stream producer and resolves its initial topology.
Applications normally call Environment#super_stream_producer.
Instance Method Detail
Routes and publishes an AMQP message.
routing_key overrides SuperStreamProducerOptions#routing_key_extractor.
A custom routing strategy ignores both values.
Routes and publishes an AMQP message, invoking the block for each selected partition's confirmation.
Routes and publishes raw, byte, or string payloads using an explicit key.
RawMessage is passed through; Bytes and String are wrapped in an AMQP
Data section by the partition producer.