Poll during rebalancing #3030
-
Using spring-kafka 2.8.11, using a logical key to produce messages to a topic, Problem starts as we have frequent rebalancing due to Keda events (new instances are joining/leaving the cluster). Edit - Another weird thing is that it seems that the partition is assigned to 2 consumers at this time. We use CooperativeStickyAssignor, and see in logs that the relevant partition is assigned to consumer x, and then assigned to consumer y, and only after dew minutes, it is revoked from consumer x. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Any chances you can try your solution with latest supported version of Spring for Apache Kafka: https://spring.io/projects/spring-kafka#learn ? |
Beta Was this translation helpful? Give feedback.
-
Thanks @artembilan |
Beta Was this translation helpful? Give feedback.
The rebalance and group management is a feature of Apache Kafka by itself.
The Spring for Apache Kafka fully relies on the configured provided by the Kafka client.
We indeed are not aware of such an error.
But again: we develop library here, not the target product, so our tests might not cover your situation.
Might be great if you could contribute some integration test against
@EmbeddedKafka
which does exactly what your use-case.So, we would have more test coverage to be sure in our components even if the problem is on the Kafka client (or even broker) side.