lib/karafka/web/tracking/consumers/contracts/job.rb in karafka-web-0.4.1 vs lib/karafka/web/tracking/consumers/contracts/job.rb in karafka-web-0.5.0
- old
+ new
@@ -12,12 +12,12 @@
required(:consumer) { |val| val.is_a?(String) }
required(:consumer_group) { |val| val.is_a?(String) }
required(:started_at) { |val| val.is_a?(Float) && val >= 0 }
required(:topic) { |val| val.is_a?(String) }
required(:partition) { |val| val.is_a?(Integer) && val >= 0 }
- required(:first_offset) { |val| val.is_a?(Integer) && val >= 0 }
- required(:last_offset) { |val| val.is_a?(Integer) && val >= 0 }
- required(:comitted_offset) { |val| val.is_a?(Integer) }
+ required(:first_offset) { |val| val.is_a?(Integer) && (val >= 0 || val == -1001) }
+ required(:last_offset) { |val| val.is_a?(Integer) && (val >= 0 || val == -1001) }
+ required(:committed_offset) { |val| val.is_a?(Integer) }
required(:type) { |val| %w[consume revoked shutdown].include?(val) }
required(:tags) { |val| val.is_a?(Karafka::Core::Taggable::Tags) }
end
end
end