Support OffsetRequest_v2
- Langage dominant
- Python
- Étoiles
- 1.4k
- Forks
- 269
- Merge moyen
- 1 j 1 h
- PR mergées (30 j)
- 6
Description
**Describe the solution you'd like**
Currently, `AIOKafkaConsumer.end_offsets` fires off either an `OffsetRequest_v0` or `OffsetRequest_v1` message to the broker.
Here, the broker will reply with the high watermark (HWM), but if you need the last stable offset (LSO) instead, you need to supply the `isolation_level`. This field was added in `OffsetRequest_v2`.
https://github.com/aio-libs/aiokafka/blob/29b58dbcacc75a62b430ce5243ac684ccf16a7f8/aiokafka/consumer/fetcher.py#L995-L1005
The `Fetcher` class already has the isolation level of the consumer, so can we switch this API call to use the newer protocol?
For example:
```python
request = OffsetRequest[2](-1, self._isolation_level, list(topic_data.items()))
```
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.