Method: Kafka::Protocol::AddPartitionsToTxnResponse.decode

Defined in:
lib/kafka/protocol/add_partitions_to_txn_response.rb

.decode(decoder) ⇒ Object



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/kafka/protocol/add_partitions_to_txn_response.rb', line 30

def self.decode(decoder)
  _throttle_time_ms = decoder.int32
  errors = decoder.array do
    TopicPartitionsError.new(
      topic: decoder.string,
      partitions: decoder.array do
        PartitionError.new(
          partition: decoder.int32,
          error_code: decoder.int16
        )
      end
    )
  end
  new(errors: errors)
end