|
if len(existingTopics) > 0 && len(c.topicConfigs) > 0 { |
|
alterCfg := make([]kadm.AlterConfig, 0, len(c.topicConfigs)) |
|
for k, v := range c.topicConfigs { |
|
alterCfg = append(alterCfg, kadm.AlterConfig{Name: k, Value: v}) |
|
} |
|
alterResp, err := c.m.adminClient.AlterTopicConfigs(ctx, |
|
alterCfg, existingTopics..., |
|
) |
As soon as a topic has been created, this code will always trigger an AlterTopicConfigs if there are any topic configs defined. This creates unnecessary API calls to Kafka, and creates log spam.
apm-queue/kafka/topiccreator.go
Lines 210 to 217 in 2261b83
As soon as a topic has been created, this code will always trigger an AlterTopicConfigs if there are any topic configs defined. This creates unnecessary API calls to Kafka, and creates log spam.