wintoncode / winton-kafka-streams

A Python implementation of Apache Kafka Streams
Apache License 2.0
313 stars 55 forks source link

Handle task migrations correctly #35

Closed jhickson closed 6 years ago

jhickson commented 7 years ago

Fixes #31.

This removes the previous use of CommitFailedException (which is Java-only) and instead mimics the Java Kafka Streams by translating certain error codes received when committing a task into a TaskMigratedError. This error is logged by StreamThread but otherwise seen as a signal to "try again".

jhickson commented 7 years ago

Made code backwards-compatible with versions for confluent-kafka-python that lack INVALID_PRODUCER_EPOCH.