Skip to content

Commit 6cdaf9f

Browse files
committed
Fix offset commits when using 0.8 brokers
1 parent d60a018 commit 6cdaf9f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

kafka/coordinator/consumer.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ def _send_offset_commit_request(self, offsets):
538538
# if the generation is None, we are not part of an active group
539539
# (and we expect to be). The only thing we can do is fail the commit
540540
# and let the user rejoin the group in poll()
541-
if generation is None:
541+
if self.config['api_version'] >= (0, 9) and generation is None:
542542
return Future().failure(Errors.CommitFailedError())
543543

544544
if self.config['api_version'] >= (0, 9):
@@ -557,9 +557,7 @@ def _send_offset_commit_request(self, offsets):
557557
)
558558
elif self.config['api_version'] >= (0, 8, 2):
559559
request = OffsetCommitRequest[1](
560-
self.group_id,
561-
generation.generation_id,
562-
generation.member_id,
560+
self.group_id, -1, '',
563561
[(
564562
topic, [(
565563
partition,

0 commit comments

Comments
 (0)