Skip to content

Commit 9d1f769

Browse files
authored
Merge pull request #4 from shafa-dev/max_bytes-parametr
add max_bytes got get_records method
2 parents 8d41d08 + 16a18b2 commit 9d1f769

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

kafka_bridge_client/consumer.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,9 @@ async def _subscribe(self) -> None:
195195
)
196196

197197
async def get_records(
198-
self, *,
198+
self,
199+
*,
200+
max_bytes: int,
199201
timeout: int = 10000
200202
) -> t.AsyncGenerator[t.Dict[str, t.Any], None]:
201203
while True:
@@ -205,7 +207,7 @@ async def get_records(
205207
group_id=self._group_id,
206208
name=self._consumer_name,
207209
),
208-
params={'timeout': timeout},
210+
params={'timeout': timeout, 'max_bytes': max_bytes},
209211
headers={'Accept': 'application/vnd.kafka.binary.v2+json'},
210212
)
211213
if response.status != 200:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "kafka-bridge-client"
3-
version = "0.1.5"
3+
version = "0.2.0"
44
description = "Python client for Strimzi Kafka Bridge"
55
authors = ["Bogdan Zaseka <zaseka.bogdan@gmail.com>"]
66
license = "MIT"

0 commit comments

Comments
 (0)