class Kafka::Protocol::OffsetCommitResponse

Attributes

topics[R]

Public Class Methods

decode(decoder) click to toggle source
# File lib/kafka/protocol/offset_commit_response.rb, line 12
def self.decode(decoder)
  topics = decoder.array {
    topic = decoder.string
    partitions = decoder.array {
      partition = decoder.int32
      error_code = decoder.int16

      [partition, error_code]
    }

    [topic, Hash[partitions]]
  }

  new(topics: Hash[topics])
end
new(topics:) click to toggle source
# File lib/kafka/protocol/offset_commit_response.rb, line 8
def initialize(topics:)
  @topics = topics
end