Class: Karafka::Pro::Processing::ConsumerGroups::ExpansionsSelector

Inherits:
Karafka::Processing::ConsumerGroups::ExpansionsSelector show all
Defined in:
lib/karafka/pro/processing/consumer_groups/expansions_selector.rb

Overview

Pro selector of appropriate topic setup based features enhancements.

Instance Method Summary collapse

Instance Method Details

#find(topic) ⇒ Array<Module>

Returns modules with proper expansions we’re suppose to use to enhance the consumer.

Parameters:

Returns:

  • (Array<Module>)

    modules with proper expansions we’re suppose to use to enhance the consumer



44
45
46
47
48
49
50
51
52
# File 'lib/karafka/pro/processing/consumer_groups/expansions_selector.rb', line 44

def find(topic)
  # Start with the non-pro expansions
  expansions = super
  expansions << Pro::Processing::ConsumerGroups::Piping::Consumer
  expansions << Pro::Processing::ConsumerGroups::OffsetMetadata::Consumer if topic.offset_metadata?
  expansions << Pro::Processing::ConsumerGroups::AdaptiveIterator::Consumer if topic.adaptive_iterator?
  expansions << Pro::Processing::ConsumerGroups::PeriodicJob::Consumer if topic.periodic_job?
  expansions
end