我在Kafka Streams应用程序(2.1版)的日志中发现了此问题。
Coordinator selected invalid assignment protocol: null
Kafka客户端库中的代码看起来很简单,找不到分配器:
PartitionAssignor assignor = lookupAssignor(assignmentStrategy);
if (assignor == null)
throw new IllegalStateException("Coordinator selected invalid
assignment protocol: " + assignmentStrategy);
和lookupAssignor只是按名称查找:
private PartitionAssignor lookupAssignor(String name) {
for (PartitionAssignor assignor : this.assignors) {
if (assignor.name().equals(name))
return assignor;
}
return null;
}
在什么情况下,Kafka Streams应用程序可能会发生这种情况?有什么后果?