如何配置 Spring Cloud Stream (Kafka) 应用程序以在 Confluent Cloud 中自动创建主题? [英] How can I configure a Spring Cloud Stream (Kafka) application to autocreate the topics in Confluent Cloud?

查看:32
本文介绍了如何配置 Spring Cloud Stream (Kafka) 应用程序以在 Confluent Cloud 中自动创建主题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法让(Spring Cloud Stream)应用程序在 Confluent Cloud 中自动创建他们需要的主题?

Is there a way to allow (Spring Cloud Stream) applications autocreate the topics they need in Confluent Cloud?

到目前为止,我不得不手动创建它们,当您考虑还必须设置变更日志主题时,这很容易出错.

So far I've had to manually create them which is error prone when you consider you also have to setup changelog topics.

推荐答案

binder 属性 autoCreateTopics默认为true.因此应该自动创建主题(除非代理权限不允许 - 但我希望在这种情况下会在日志中看到错误).

The binder property autoCreateTopics is true by default. So topics should be created automatically, (unless the broker permissions don't allow it - but I would expect to see errors in the logs in that case).

还有另一个属性 autoAddPartitions 默认为 false.

There is another property autoAddPartitions which is false by default.

这篇关于如何配置 Spring Cloud Stream (Kafka) 应用程序以在 Confluent Cloud 中自动创建主题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆