Class: Fake::Kafka::Message

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value, key, topic, partition, offset) ⇒ Message

Returns a new instance of Message.



3
4
5
6
7
8
9
# File 'lib/fake/kafka/message.rb', line 3

def initialize(value, key, topic, partition, offset)
  @value = value
  @key = key
  @topic = topic
  @partition = partition
  @offset = offset
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



2
3
4
# File 'lib/fake/kafka/message.rb', line 2

def key
  @key
end

#offsetObject (readonly)

Returns the value of attribute offset.



2
3
4
# File 'lib/fake/kafka/message.rb', line 2

def offset
  @offset
end

#partitionObject (readonly)

Returns the value of attribute partition.



2
3
4
# File 'lib/fake/kafka/message.rb', line 2

def partition
  @partition
end

#topicObject (readonly)

Returns the value of attribute topic.



2
3
4
# File 'lib/fake/kafka/message.rb', line 2

def topic
  @topic
end

Instance Method Details

#valueObject



11
12
13
# File 'lib/fake/kafka/message.rb', line 11

def value
  @value.to_json
end