Class: Karafka::Connection::Message

Inherits:
Object
  • Object
show all
Defined in:
lib/karafka/connection/message.rb

Overview

Single incoming Kafka message instance wrapper

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(topic, content) ⇒ Karafka::Connection::Message

Returns incoming message instance.

Parameters:

  • topic (String)

    topic from which this message comes

  • content (String)

    raw message content (not deserialized or anything) from Kafka



11
12
13
14
# File 'lib/karafka/connection/message.rb', line 11

def initialize(topic, content)
  @topic = topic
  @content = content
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



6
7
8
# File 'lib/karafka/connection/message.rb', line 6

def content
  @content
end

#topicObject (readonly)

Returns the value of attribute topic.



6
7
8
# File 'lib/karafka/connection/message.rb', line 6

def topic
  @topic
end