Skip to content

fix: don't crash streaming pipeline on Kafka consumer eviction (0.3.13)#73

Merged
anaselmhamdi merged 1 commit into
mainfrom
anaselmhamdi/kafka-no-crash-on-evict
Apr 17, 2026
Merged

fix: don't crash streaming pipeline on Kafka consumer eviction (0.3.13)#73
anaselmhamdi merged 1 commit into
mainfrom
anaselmhamdi/kafka-no-crash-on-evict

Conversation

@anaselmhamdi

Copy link
Copy Markdown
Collaborator

Summary

  • On Kafka ILLEGAL_GENERATION / UNKNOWN_MEMBER_ID (consumer evicted from the group), KafkaSource.commit() now closes the evicted consumer, recreates a fresh one in place, and returns — instead of re-raising, which previously caused the streaming runner to exit with SOURCE_ERROR and the pod to be restarted. Next iteration's subscribe() / assign() rejoins the group.
  • Uncommitted records from the failed batch may be reprocessed by the new partition owner; this is consistent with Bizon's at-least-once delivery contract.
  • Bumps version to 0.3.13.

Test plan

  • uv run pytest tests/connectors/sources/kafka/ — 27/27 pass
  • uv run ruff format / ruff check clean
  • Staging: force a rebalance (scale consumers, drop heartbeats) and confirm the warning is logged and the pipeline keeps iterating instead of exiting with SOURCE_ERROR

🤖 Generated with Claude Code

On ILLEGAL_GENERATION / UNKNOWN_MEMBER_ID, close the evicted consumer,
recreate a fresh one in place, and continue the loop instead of
re-raising. Next subscribe()/assign() rejoins the group. Uncommitted
records may be reprocessed — consistent with Bizon's at-least-once
contract.

Bump to 0.3.13.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@anaselmhamdi anaselmhamdi merged commit 5b48e02 into main Apr 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant