consumer.consume
return unassigned messages if rebalance happens during the call
#1013
Closed
4 of 7 tasks
Labels
Description
When asking for large number of messages using
consumer.consume
with a large timeout, non-assigned messages are returned if a rebalance happens during that consume call.How to reproduce
When starting two of the above processes fairly rapidly the first is assigned all 128 partitions and then a rebalance is triggered before consume have returned any messages. On my machine there need to be sufficient amount of messages available to trigger the behavior.
The output of the first process is:
According to #435 (comment) the internal queue should be cleared on rebalance.
The same result happens if I remove the assign call in the on_assign callback. (it's handled internally now)
rkqu
is not filtered afterrd_kafka_consume_batch_queue
completes, and I guess librdkafka doesn't touch that queue onassign
:confluent-kafka-python/src/confluent_kafka/src/Consumer.c
Line 935 in c32cd12
If this is not considered a bug, the behavior should at least be documented? Or is it something I've overlooked?
PS: Similar issue for a node-rdkafka wrapper: Blizzard/node-rdkafka#638 (comment)
Checklist
Please provide the following information:
ck.version()=('1.5.0', 17104896)
andck.libversion()=('1.5.0', 17105151)
):'debug': '..'
as necessary)The text was updated successfully, but these errors were encountered: