aio-libs / aio-libs/aiokafka

[QUESTION] on_partitions_assigned & getone/getmany

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

Descrição

ConsumerRebalanceListener.on_partitions_assigned docstring says:

This method will be called *after* partition re-assignment completes
and *before* the consumer starts fetching data again.

I assume this follows original Java API description:

ConsumerRebalanceListener.onPartitionsAssigned

This method will be called after the partition re-assignment completes and before the consumer starts fetching data, and only as the result of a poll(long) call.

My interpretation of both doc is "the consumer will not consume from a newly assigned partition before the callback completes execution".

As I observe in my tests, this is not true at least for aiokafka.
Here is the line where fetcher is essentially unblocked from reading,
https://github.com/aio-libs/aiokafka/blob/fff2c021a57291a7484200a5f6b9e82611e59ed9/aiokafka/consumer/group_coordinator.py#L449
while listener is called 20 lines below.

Can anyone clarify, what is the desired behavior?

Thanks, Alexander

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.