Sha256: b4ad1b80e8e2368db7f4ef08a99e519c1e0fd9965a2d5a055222bd2f48abf065
Contents?: true
Size: 959 Bytes
Versions: 8
Compression:
Stored size: 959 Bytes
Contents
module Kafka module Protocol class CreatePartitionsRequest def initialize(topics:, timeout:) @topics, @timeout = topics, timeout end def api_key CREATE_PARTITIONS_API end def api_version 0 end def response_class Protocol::CreatePartitionsResponse end def encode(encoder) encoder.write_array(@topics) do |topic, count, assignments| encoder.write_string(topic) encoder.write_int32(count) encoder.write_array(assignments) do |assignment| encoder.write_array(assignment) do |broker| encoder.write_int32(broker) end end end # Timeout is in ms. encoder.write_int32(@timeout * 1000) # validate_only. There isn't any use case for this in real life. So # let's ignore it for now encoder.write_boolean(false) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems