Sha256: 8589975b6ad7c3bd7914d2d47866d3bc2dd8527c0bda417d8dc099f2bf916e25

Contents?: true

Size: 686 Bytes

Versions: 18

Compression:

Stored size: 686 Bytes

Contents

# frozen_string_literal: true

module Karafka
  module Params
    # Simple batch metadata object that stores all non-message information received from Kafka
    # cluster while fetching the data
    # @note This metadata object refers to per batch metadata, not `#params.metadata`
    BatchMetadata = Struct.new(
      :batch_size,
      :first_offset,
      :highwater_mark_offset,
      :unknown_last_offset,
      :last_offset,
      :offset_lag,
      :deserializer,
      :partition,
      :topic,
      keyword_init: true
    ) do
      # @return [Boolean] is the last offset known or unknown
      def unknown_last_offset?
        unknown_last_offset
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
karafka-1.4.15 lib/karafka/params/batch_metadata.rb
karafka-1.4.14 lib/karafka/params/batch_metadata.rb
karafka-1.4.13 lib/karafka/params/batch_metadata.rb
karafka-1.4.12 lib/karafka/params/batch_metadata.rb
karafka-1.4.11 lib/karafka/params/batch_metadata.rb
karafka-1.4.10 lib/karafka/params/batch_metadata.rb
karafka-1.4.9 lib/karafka/params/batch_metadata.rb
karafka-1.4.8 lib/karafka/params/batch_metadata.rb
karafka-1.4.7 lib/karafka/params/batch_metadata.rb
karafka-1.4.6 lib/karafka/params/batch_metadata.rb
karafka-1.4.5 lib/karafka/params/batch_metadata.rb
karafka-1.4.4 lib/karafka/params/batch_metadata.rb
karafka-1.4.3 lib/karafka/params/batch_metadata.rb
karafka-1.4.2 lib/karafka/params/batch_metadata.rb
karafka-1.4.1 lib/karafka/params/batch_metadata.rb
karafka-1.4.0 lib/karafka/params/batch_metadata.rb
karafka-1.4.0.rc2 lib/karafka/params/batch_metadata.rb
karafka-1.4.0.rc1 lib/karafka/params/batch_metadata.rb