[Optimize]增加AdminClient观测信息 (#1111)

1、增加AdminClient的ClientID;
2、关闭时,增加超时时间;
3、增加关闭错误的日志;
This commit is contained in:
EricZeng
2023-08-02 21:19:03 +08:00
committed by GitHub
parent 55161e439a
commit db40a5cd0a
2 changed files with 12 additions and 4 deletions

View File

@@ -78,6 +78,7 @@ public class GroupServiceImpl extends BaseKafkaVersionControlService implements
}
props.put(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, clusterPhy.getBootstrapServers());
props.put(AdminClientConfig.CLIENT_ID_CONFIG, String.format("KSPartialAdminClient||clusterPhyId=%d", clusterPhy.getId()));
adminClient = KSPartialKafkaAdminClient.create(props);
KSListGroupsResult listConsumerGroupsResult = adminClient.listConsumerGroups(
@@ -178,6 +179,7 @@ public class GroupServiceImpl extends BaseKafkaVersionControlService implements
}
props.put(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, clusterPhy.getBootstrapServers());
props.put(AdminClientConfig.CLIENT_ID_CONFIG, String.format("KSPartialAdminClient||clusterPhyId=%d", clusterPhy.getId()));
adminClient = KSPartialKafkaAdminClient.create(props);