如何动态地将主题传递给Kafka侦听器? [英] How to pass topics dynamically to a kafka listener?
本文介绍了如何动态地将主题传递给Kafka侦听器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
几天以来,我正在尝试动态地将主题传递给Kafka侦听器的方法,而不是通过Java DSL的键来使用它们.周围的任何人之前都做过此事,或者可能会发现实现此目的的最佳方法是什么?
From a couple of days I'm trying out ways to dynamically pass topics to Kafka listener rather than using them through keys from a Java DSL. Anyone around done this before or could throw some light on what is the best way to achieve this?
推荐答案
您不能将主题动态传递给Kafka监听器";您必须以编程方式创建侦听器容器.
You cannot "dynamically pass topics to Kafka listener "; you have to programmatically create a listener container instead.
这篇关于如何动态地将主题传递给Kafka侦听器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文