Method: Karafka::Pro::Processing::Collapser#refresh!

Defined in:
lib/karafka/pro/processing/collapser.rb

#refresh!(first_offset) ⇒ Object

Sets the collapse state based on the first collective offset that we are going to process and makes the decision whether or not we need to still keep the collapse.

Parameters:

  • first_offset (Integer)

    first offset from a collective batch



46
47
48
49
50
# File 'lib/karafka/pro/processing/collapser.rb', line 46

def refresh!(first_offset)
  @mutex.synchronize do
    @collapsed = first_offset < @until_offset
  end
end