0

log:reactor.core.Exceptions$ErrorCallbackNotImplemented: org.apache.kafka.common.errors.TimeoutException: Topic topic not present in metadata after 60000 ms. Caused by: org.apache.kafka.common.errors.TimeoutException: Topic topic not present in metadata after 60000 ms.尝试在 kafka 上生成消息时不断获取。

已经确保我在生产者项目中有 Jackson 核心、Jackson 数据绑定和 Kafka 客户端依赖项。另外我如何在反应堆 kafka SenderOptions 中传递安全协议

4

1 回答 1

0

Topic topic not present in metadata after 60000 ms.您必须先创建主题,然后才能使用它 - 无论是使用命令行工具,还是使用AdminClient.

您可以设置ProducerConfig传递给create().

    /**
     * Creates a sender options instance with the specified config overrides for the underlying
     * Kafka {@link Producer}.
     * @return new instance of sender options
     */
    @NonNull
    static <K, V> SenderOptions<K, V> create(@NonNull Map<String, Object> configProperties) {
        return new ImmutableSenderOptions<>(configProperties);
    }
于 2021-07-08T19:21:44.110 回答