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.
104 105 106 |
# File 'lib/karafka/pro/routing/features/multiplexing/contracts/topic.rb', line 104 def boot(data) data[:subscription_group_details].fetch(:multiplexing_boot, false) end |
.max(data) ⇒ Integer, false
Returns max or false if missing.
98 99 100 |
# File 'lib/karafka/pro/routing/features/multiplexing/contracts/topic.rb', line 98 def max(data) data[:subscription_group_details].fetch(:multiplexing_max, false) end |
.min(data) ⇒ Integer, false
Returns min or false if missing.
92 93 94 |
# File 'lib/karafka/pro/routing/features/multiplexing/contracts/topic.rb', line 92 def min(data) data[:subscription_group_details].fetch(:multiplexing_min, false) end |