Class: Kafka::PendingMessage

Inherits:
Object
  • Object
show all
Defined in:
lib/kafka/pending_message.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value:, key:, topic:, partition:, partition_key:, create_time:) ⇒ PendingMessage

Returns a new instance of PendingMessage.


7
8
9
10
11
12
13
14
15
16
# File 'lib/kafka/pending_message.rb', line 7

def initialize(value:, key:, topic:, partition:, partition_key:, create_time:)
  @key = key
  @value = value
  @topic = topic
  @partition = partition
  @partition_key = partition_key
  @create_time = create_time

  @bytesize = key.to_s.bytesize + value.to_s.bytesize
end

Instance Attribute Details

#bytesizeObject (readonly)

Returns the value of attribute bytesize


5
6
7
# File 'lib/kafka/pending_message.rb', line 5

def bytesize
  @bytesize
end

#create_timeObject (readonly)

Returns the value of attribute create_time


5
6
7
# File 'lib/kafka/pending_message.rb', line 5

def create_time
  @create_time
end

#keyObject (readonly)

Returns the value of attribute key


3
4
5
# File 'lib/kafka/pending_message.rb', line 3

def key
  @key
end

#partitionObject (readonly)

Returns the value of attribute partition


3
4
5
# File 'lib/kafka/pending_message.rb', line 3

def partition
  @partition
end

#partition_keyObject (readonly)

Returns the value of attribute partition_key


3
4
5
# File 'lib/kafka/pending_message.rb', line 3

def partition_key
  @partition_key
end

#topicObject (readonly)

Returns the value of attribute topic


3
4
5
# File 'lib/kafka/pending_message.rb', line 3

def topic
  @topic
end

#valueObject (readonly)

Returns the value of attribute value


3
4
5
# File 'lib/kafka/pending_message.rb', line 3

def value
  @value
end