Class: Karafka::Pro::Routing::Features::Multiplexing::Contracts::Topic
- Inherits:
-
Contracts::Base
- Object
- Core::Contractable::Contract
- Contracts::Base
- Karafka::Pro::Routing::Features::Multiplexing::Contracts::Topic
- Defined in:
- lib/karafka/pro/routing/features/multiplexing/contracts/topic.rb
Overview
Validates the subscription group multiplexing setup We validate it on the topic level as subscription groups are not built during the routing as they are pre-run dynamically built.
multiplexing attributes are optional since multiplexing may not be enabled
Class Method Summary collapse
-
.boot(data) ⇒ Integer, false
Boot or false if missing.
-
.max(data) ⇒ Integer, false
Max or false if missing.
-
.min(data) ⇒ Integer, false
Min or false if missing.
Methods inherited from Contracts::Base
Class Method Details
.boot(data) ⇒ Integer, false
Returns boot or false if missing.
96 97 98 |
# File 'lib/karafka/pro/routing/features/multiplexing/contracts/topic.rb', line 96 def boot(data) data[:subscription_group_details].fetch(:multiplexing_boot, false) end |
.max(data) ⇒ Integer, false
Returns max or false if missing.
90 91 92 |
# File 'lib/karafka/pro/routing/features/multiplexing/contracts/topic.rb', line 90 def max(data) data[:subscription_group_details].fetch(:multiplexing_max, false) end |
.min(data) ⇒ Integer, false
Returns min or false if missing.
84 85 86 |
# File 'lib/karafka/pro/routing/features/multiplexing/contracts/topic.rb', line 84 def min(data) data[:subscription_group_details].fetch(:multiplexing_min, false) end |