Skip to content

Rebalancing problem between Spring Kafka consumers with versions <=2.3.13.RELEASE and >=2.4.0.RELEASE (included 2.8.6) #2277

@ferblaca

Description

@ferblaca

I am having problems with kafka consumers of applications with different versions of Spring-kafka, specifically between 2.3.13.RELEASE and >=2.4.0.RELEASE (included 2.8.6).

We have noticed that when performing a blue/green deployment, in which we upgrade consumer applications that were on Spring-Kafka version 2.3.13.RELEASE to [2.4.0.RELEASE,2.8.6], and that for a while both versions of the applications are deployed and active at the same time, the applications with Spring-Kafka version [2.4.0.RELEASE,2.8.6] do not get any partitioning under the following circumstances:

  • Both applications have a consumer with the same group name to the same topic.
  • Both applications have the consumer configured with concurrency equal to the number of partitions the topic has.

The result is that, for example, if the topic has 10 partitions, the application with Spring-Kafka version 2.3.13.RELEASE is assigned all 10 partitions, while the application with Spring-Kafka [2.4.0.RELEASE,2.8.6] is not assigned any partition.

No matter in which order the applications are deployed, the end result is always the same.

When the Spring-Kafka 2.3.13.RELEASE application stops, the [2.4.0.RELEASE,2.8.6] application is assigned all 10 partitions correctly.

For more detailed information on application logs, see the following link.

Would it be possible by configuration to avoid this behaviour?

I attach the apps that reproduce this described behavior: springKafkaIssue.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions