class Crabbit::SuperStreamConsumer

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.cr

Constructors

Instance Method Summary

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.


[View source]

Instance Method Detail

def close : Nil #

Idempotently stops topology refresh and closes all partition consumers.


[View source]
def consumers : Array(Consumer) #

Returns a snapshot of the current partition consumers.


[View source]
def super_stream : String #

Returns the logical super-stream name.


[View source]