java - 为什么camel kafka autoconfig有两个allow-manual-commit设置?
问题描述
我的 spring boot 属性文件中有两个配置,并且正在使用 camel 2.23:
#camel.component.kafka.allow-manual-commit=true <-- works when i uncomment and use
###Why isnt the below option being picked up??
camel.component.kafka.configuration.allow-manual-commit=true <-- not working
似乎当我使用camel.component.kafka.allow-manual-commit=true
而不是.configuration
扩展名称空间时......一切正常。但是当我使用配置之一时,它失败了......即它没有检测到 allowManualCommit 为真
我在第 31 行查看了这个camel-kafka-starter的代码,并注意到它被注释为指向camel.component.kafka
命名空间。这是有道理的,但是 .configuration 命名空间是从哪里来的……camel.component.kafka.allow-manual-commit 的默认“false”值是否覆盖了我在 camel.component.kafka.configuration 上设置的 true 值。允许手动提交?
在我的代码中,我有一条骆驼路线
from("kafka?{topic}")
和其他地方我正在使用KafkaManualCommit
对象来 commitSync()
解决方案
推荐阅读
- xml - 如何将新的 xml 节点插入到空的父节点?
- tsql - 带有联合的 TSQL 东西
- google-api - YouTube 数据 API 配额增加响应为“用户体验 - 播放完整性” - 需要帮助
- vb.net - 使用 .Show() 时无法设置表单属性
- python - matplotlib.patches:一个有多种颜色的补丁
- canvas - 复杂画布形状上的单击事件,无需借助外部库
- reactjs - 如何设置 react-data-grid 的动态高度
- java - 在 Freemarker 模板引擎中读取导致 TemplateException 的 Java 对象
- python - 哪个会更快:redis 扫描匹配或首先从 mysql 检索可能的键?
- c++ - 如何在 Particle (Spark) 的本地构建中包含第三方库?