Class: Kafka::PendingMessage
- Inherits:
-
Object
- Object
- Kafka::PendingMessage
- Defined in:
- lib/kafka/pending_message.rb
Instance Attribute Summary collapse
-
#bytesize ⇒ Object
readonly
Returns the value of attribute bytesize.
-
#create_time ⇒ Object
readonly
Returns the value of attribute create_time.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#partition ⇒ Object
readonly
Returns the value of attribute partition.
-
#partition_key ⇒ Object
readonly
Returns the value of attribute partition_key.
-
#topic ⇒ Object
readonly
Returns the value of attribute topic.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value:, key:, topic:, partition:, partition_key:, create_time:) ⇒ PendingMessage
constructor
A new instance of PendingMessage.
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
#bytesize ⇒ Object (readonly)
Returns the value of attribute bytesize.
5 6 7 |
# File 'lib/kafka/pending_message.rb', line 5 def bytesize @bytesize end |
#create_time ⇒ Object (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 |
#key ⇒ Object (readonly)
Returns the value of attribute key.
3 4 5 |
# File 'lib/kafka/pending_message.rb', line 3 def key @key end |
#partition ⇒ Object (readonly)
Returns the value of attribute partition.
3 4 5 |
# File 'lib/kafka/pending_message.rb', line 3 def partition @partition end |
#partition_key ⇒ Object (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 |
#topic ⇒ Object (readonly)
Returns the value of attribute topic.
3 4 5 |
# File 'lib/kafka/pending_message.rb', line 3 def topic @topic end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
3 4 5 |
# File 'lib/kafka/pending_message.rb', line 3 def value @value end |