Sha256: 3bf66d974a17c5a78fd58bf96248730b899c7befeb428e1a4c962343f9a775e0
Contents?: true
Size: 1.14 KB
Versions: 24
Compression:
Stored size: 1.14 KB
Contents
module Kafka module Protocol class OffsetCommitRequest # This value signals to the broker that its default configuration should be used. DEFAULT_RETENTION_TIME = -1 def api_key 8 end def api_version 2 end def response_class OffsetCommitResponse end def initialize(group_id:, generation_id:, member_id:, retention_time: DEFAULT_RETENTION_TIME, offsets:) @group_id = group_id @generation_id = generation_id @member_id = member_id @retention_time = retention_time @offsets = offsets end def encode(encoder) encoder.write_string(@group_id) encoder.write_int32(@generation_id) encoder.write_string(@member_id) encoder.write_int64(@retention_time) encoder.write_array(@offsets) do |topic, partitions| encoder.write_string(topic) encoder.write_array(partitions) do |partition, offset| encoder.write_int32(partition) encoder.write_int64(offset) encoder.write_string(nil) # metadata end end end end end end
Version data entries
24 entries across 24 versions & 1 rubygems