Open
Description
Description
In some scenarios, adding new partitions to existing topics does not assign these partitions to consumers that are currently subscribed to these topics. This happens only when:
- New partitions are added to topics that are not consumed by a group leader
partition.assignment.strategy
is eitherrange
orroundrobin
.cooperative-sticky
seems to fix this bug
I haven't provided any logs because the scenario seems easy enough to replicate, and because I need to clear sending you the logs with our security department. But if you need any - please feel free to ask, I'll see what I can do.
How to reproduce
- Create 3 topics with arbitrary amount of partitions
- Create 3 consumers in the same consumer group and subscribe each consumer to one topic each. Make sure that one consumer joins a bit earlier than the other 2 (so it becomes a group leader)
- Add new partitions to topics that are not consumed by a group leader
Expected behavior
New partitions are assigned to non-leader consumers
Actual behavior
New partitions remain unassigned. Group rebalancing just re-assigns old partitions.
Note that if you add new partitions to a topic consumed by a group leader then everything works as expected.
Checklist
- librdkafka version (release number or git tag):
2.3.0
- Apache Kafka version:
3.6.0
- librdkafka client configuration:
"auto.offset.reset" = "earliest"
"enable.auto.commit" = "true"
"enable.auto.offset.store" = "false"
"topic.metadata.refresh.interval.ms" = "1000"
"metadata.max.age.ms" = "1000"
- Operating system:
Windows 10 x64
- Provide logs (with
debug=..
as necessary) from librdkafka - Provide broker log excerpts
- Critical issue