【发布时间】:2019-09-15 19:43:32
【问题描述】:
当生产者首次向主题发布消息时,我们的 AWS MSK 集群不会自动创建主题。这是令人惊讶的,因为根据https://kafka.apache.org/documentation/#brokerconfigs 的默认行为应该有auto.create.topics.enable = true。
我已尝试在我的代理上设置此配置,但我无法设置,因为配置为 read-only 用于动态更新。
$ kafka-configs --bootstrap-server $KAFKA_BROKER --entity-type brokers --entity-default --alter --add-config auto.create.topics.enable=true
Error while executing config command with args '--bootstrap-server $KAFKA_BROKER --entity-type brokers --entity-default --alter --add-config auto.create.topics.enable=true'
java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.InvalidRequestException: Invalid config value for resource ConfigResource(type=BROKER, name=''): Cannot update these configs dynamically: Set(auto.create.topics.enable)
注意:我在输出中将代理的 IP 替换为 $KAFKA_BROKER
如何配置我的 AWS MSK Kafka 集群以启用主题的自动创建?
【问题讨论】:
标签: amazon-web-services apache-kafka aws-msk