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, scale_delay: 60_000) ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'lib/karafka/pro/routing/features/multiplexing/proxy.rb', line 19 def multiplexing(min: nil, max: 1, boot: nil, scale_delay: 60_000) @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, multiplexing_scale_delay: scale_delay ) end |