Module: Karafka::Pro::Routing::Features::Multiplexing::Proxy
- Defined in:
- lib/karafka/pro/routing/features/multiplexing/proxy.rb
Overview
Allows for multiplexing setup inside a consumer group definition
Instance Method Summary collapse
Instance Method Details
#multiplexing(min: nil, max: 1, boot: nil) ⇒ Object
25 26 27 28 29 30 31 32 |
# File 'lib/karafka/pro/routing/features/multiplexing/proxy.rb', line 25 def multiplexing(min: nil, max: 1, boot: nil) @target.current_subscription_group_details.merge!( multiplexing_min: min || max, multiplexing_max: max, # Picks half of max by default as long as possible. Otherwise goes with min multiplexing_boot: boot || [min || max, (max / 2)].max ) end |