Tag: apache kafka

卡夫卡流:使用相同的`application.id`从多个主题中消费

我有一个应用程序,需要听取多个不同的主题; 每个主题都有独立的消息处理逻辑。 我曾经想过为每个KafkaStreams实例使用相同的kafka属性,但是我得到如下所示的错误。 错误 java.lang.IllegalArgumentException: Assigned partition my-topic-1 for non-subscribed topic regex pattern; subscription pattern is my-other-topic 代码 (kotlin) class KafkaSetup() { companion object { private val LOG = LoggerFactory.getLogger(this::class.java) } fun getProperties(): Properties { val properties = Properties() properties.put(StreamsConfig.APPLICATION_ID_CONFIG, “my-app”) return properties } private fun listenOnMyTopic() { val kStreamBuilder = KStreamBuilder() val kStream: KStream […]