Class: Karafka::Processing::ExpansionsSelector

Inherits:
Object
  • Object
show all
Defined in:
lib/karafka/processing/expansions_selector.rb

Overview

Selector of appropriate topic setup based features enhancements.

Those expansions to the consumer API are NOT about the flow of processing. For this we have strategies. Those are suppose to provide certain extra APIs that user can use to get some extra non-flow related functionalities.

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



15
16
17
18
19
# File 'lib/karafka/processing/expansions_selector.rb', line 15

def find(topic)
  expansions = []
  expansions << Processing::InlineInsights::Consumer if topic.inline_insights?
  expansions
end