Regarding TaskAssignor for stateful tasks

Kafka streams version - 6.0.1

Recently we are seeing that task assignment is quite uneven in our Kafka streams stateful app. According to the log - INFO o.a.k.s.p.i.a.HighAvailabilityTaskAssignor - Decided on assignment: , I am concluding that task assignor used is HighAvailabilityTaskAssignor.

  1. But shouldn’t it be StickyTaskAssignor?
  2. As per the code, the task assignor assigns tasks by comparing the proposedSkew with the skew. So, we shouldn’t see an uneven distribution of stateful tasks, but how come we see distribution quite uneven across various consumers. we can see this Log - capacity: 4 assigned: 0 for multiple client states. In what scenario does this happen? What can be the possible issue causing this?

Thanks.