Class: Karafka::Pro::ScheduledMessages::State
- Inherits:
-
Object
- Object
- Karafka::Pro::ScheduledMessages::State
- Defined in:
- lib/karafka/pro/scheduled_messages/state.rb
Overview
Represents the loading/bootstrapping state of the given topic partition
Bootstrapping can be in the following states: - fresh - when we got an assignment but we did not load the schedule yet - loading - when we are in the process of bootstrapping the daily state and we consume historical messages to build the needed schedules. - loaded - state in which we finished loading all the schedules and we can dispatch messages when the time comes and we can process real-time incoming schedules and changes to schedules as they appear in the stream. - shutdown - the states are no longer available as the consumer has shut down
Instance Method Summary collapse
-
#initialize ⇒ State
constructor
Initializes the state as fresh.
-
#to_s ⇒ String
Current state string representation.
Constructor Details
#initialize ⇒ State
Initializes the state as fresh
31 32 33 |
# File 'lib/karafka/pro/scheduled_messages/state.rb', line 31 def initialize @state = 'fresh' end |
Instance Method Details
#to_s ⇒ String
Returns current state string representation.
46 47 48 |
# File 'lib/karafka/pro/scheduled_messages/state.rb', line 46 def to_s @state end |