Skip to content

Commit

Permalink
feat: Bump confluent kafka to 1.6.1 (#51)
Browse files Browse the repository at this point in the history
Updates confluent-kafka (and librdkafka) from 1.5.0 to 1.6.1.
This upgrade includes support for incremental consumer rebalancing
which we would like to try.
  • Loading branch information
lynnagara authored Mar 29, 2022
1 parent c98334e commit 98864cf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
5 changes: 4 additions & 1 deletion arroyo/backends/kafka/consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,10 @@ def poll(self, timeout: Optional[float] = None) -> Optional[Message[KafkaPayload
)
elif code == KafkaError._TRANSPORT:
raise TransportError(str(error))
elif code == KafkaError.OFFSET_OUT_OF_RANGE:
elif code in (
KafkaError.OFFSET_OUT_OF_RANGE,
KafkaError._AUTO_OFFSET_RESET,
):
raise OffsetOutOfRange(str(error))
else:
raise ConsumerError(str(error))
Expand Down
3 changes: 2 additions & 1 deletion arroyo/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ def __init__(self, partition: Partition, offset: int):

class OffsetOutOfRange(ConsumerError):
"""
Raised when trying to read from an invalid position in the partition.
Raised when encountering an auto offset reset error or trying to read from
an invalid position in the partition.
"""


Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
confluent-kafka==1.5.0
confluent-kafka==1.6.1
mypy==0.812

0 comments on commit 98864cf

Please sign in to comment.