lib/kafka/protocol/offset_commit_request.rb in ruby-kafka-0.3.4 vs lib/kafka/protocol/offset_commit_request.rb in ruby-kafka-0.3.5

- old
+ new

@@ -1,8 +1,11 @@ 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 @@ -11,10 +14,10 @@ def response_class OffsetCommitResponse end - def initialize(group_id:, generation_id:, member_id:, retention_time: 0, offsets:) + 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