class
Crabbit::SuperStreamConsumer
- Crabbit::SuperStreamConsumer
- Reference
- Object
Overview
Maintains callback consumers for every current super-stream partition.
Partition additions and removals are reconciled every
ConsumerOptions#topology_refresh. Delivery order is preserved within each
partition, not globally across the super stream.
Defined in:
crabbit/super_stream.crConstructors
-
.new(environment : Environment, super_stream : String, options : ConsumerOptions, handler : Proc(Delivery, Nil))
Creates partition consumers and starts topology refresh.
Instance Method Summary
-
#close : Nil
Idempotently stops topology refresh and closes all partition consumers.
-
#consumers : Array(Consumer)
Returns a snapshot of the current partition consumers.
-
#super_stream : String
Returns the logical super-stream name.
Constructor Detail
def self.new(environment : Environment, super_stream : String, options : ConsumerOptions, handler : Proc(Delivery, Nil))
#
Creates partition consumers and starts topology refresh.
Applications normally call Environment#super_stream_consumer.
Instance Method Detail
Returns a snapshot of the current partition consumers.