Class: Karafka::Web::Ui::Models::Status::Checks::ConsumersReportsSchemaState

Inherits:
Base
  • Object
show all
Defined in:
lib/karafka/web/ui/models/status/checks/consumers_reports_schema_state.rb

Overview

Checks if the consumer can digest the consumers reports with its schema.

The schema_state in the current state indicates whether the consumer processing reports can properly deserialize them. If incompatible, data may be lost or corrupted.

Instance Method Summary collapse

Methods inherited from Base

depends_on, halted_details, independent!, independent?, #initialize

Constructor Details

This class inherits a constructor from Karafka::Web::Ui::Models::Status::Checks::Base

Instance Method Details

#callStatus::Step

Executes the consumers reports schema state check.

Verifies that the schema_state is ‘compatible’.

Returns:

  • (Status::Step)

    success if compatible, failure otherwise



22
23
24
25
# File 'lib/karafka/web/ui/models/status/checks/consumers_reports_schema_state.rb', line 22

def call
  compatible = context.current_state[:schema_state] == "compatible"
  step(compatible ? :success : :failure)
end