Class: Karafka::Params::BatchMetadata

Inherits:
Struct
  • Object
show all
Defined in:
lib/karafka/params/batch_metadata.rb

Overview

Note:

This metadata object refers to per batch metadata, not ‘#params.metadata`

Simple batch metadata object that stores all non-message information received from Kafka cluster while fetching the data

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#batch_sizeObject

Returns the value of attribute batch_size

Returns:

  • (Object)

    the current value of batch_size



8
9
10
# File 'lib/karafka/params/batch_metadata.rb', line 8

def batch_size
  @batch_size
end

#deserializerObject

Returns the value of attribute deserializer

Returns:

  • (Object)

    the current value of deserializer



8
9
10
# File 'lib/karafka/params/batch_metadata.rb', line 8

def deserializer
  @deserializer
end

#first_offsetObject

Returns the value of attribute first_offset

Returns:

  • (Object)

    the current value of first_offset



8
9
10
# File 'lib/karafka/params/batch_metadata.rb', line 8

def first_offset
  @first_offset
end

#highwater_mark_offsetObject

Returns the value of attribute highwater_mark_offset

Returns:

  • (Object)

    the current value of highwater_mark_offset



8
9
10
# File 'lib/karafka/params/batch_metadata.rb', line 8

def highwater_mark_offset
  @highwater_mark_offset
end

#last_offsetObject

Returns the value of attribute last_offset

Returns:

  • (Object)

    the current value of last_offset



8
9
10
# File 'lib/karafka/params/batch_metadata.rb', line 8

def last_offset
  @last_offset
end

#offset_lagObject

Returns the value of attribute offset_lag

Returns:

  • (Object)

    the current value of offset_lag



8
9
10
# File 'lib/karafka/params/batch_metadata.rb', line 8

def offset_lag
  @offset_lag
end

#partitionObject

Returns the value of attribute partition

Returns:

  • (Object)

    the current value of partition



8
9
10
# File 'lib/karafka/params/batch_metadata.rb', line 8

def partition
  @partition
end

#topicObject

Returns the value of attribute topic

Returns:

  • (Object)

    the current value of topic



8
9
10
# File 'lib/karafka/params/batch_metadata.rb', line 8

def topic
  @topic
end

#unknown_last_offsetObject

Returns the value of attribute unknown_last_offset

Returns:

  • (Object)

    the current value of unknown_last_offset



8
9
10
# File 'lib/karafka/params/batch_metadata.rb', line 8

def unknown_last_offset
  @unknown_last_offset
end

Instance Method Details

#unknown_last_offset?Boolean

Returns is the last offset known or unknown.

Returns:

  • (Boolean)

    is the last offset known or unknown



21
22
23
# File 'lib/karafka/params/batch_metadata.rb', line 21

def unknown_last_offset?
  unknown_last_offset
end