aio-libs / aio-libs/aiokafka

Support OffsetRequest_v2

Aberta
#1,087 1 comentário 0 reações 0 responsáveis Ver no GitHub
enhancement
Linguagem predominante
Python
Estrelas
1.4k
Forks
269
Merge médio
1d 1h
PRs com merge (30d)
6

Descrição

**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()))
```

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.