Alexandre A Barbosa
12/28/2022, 3:40 PMconst val
for name of the topic. This information comes from a parameter. Even if I assign the value to a new variable I get this issue…
Could you please help me to implement that correctly?Luis Mirabal
12/28/2022, 3:52 PMBenoît Liessens
12/28/2022, 3:54 PM@Value
through the constructor insteadAlexandre A Barbosa
12/28/2022, 3:55 PMAlexandre A Barbosa
12/28/2022, 3:56 PMLuis Mirabal
12/28/2022, 3:58 PMBenoît Liessens
12/28/2022, 3:58 PMval
in the constructor?Alexandre A Barbosa
12/28/2022, 3:58 PMAlexandre A Barbosa
12/28/2022, 3:58 PMAlexandre A Barbosa
12/28/2022, 4:00 PMAlexandre A Barbosa
12/28/2022, 4:00 PMAlexandre A Barbosa
12/28/2022, 4:03 PMJacob
12/28/2022, 4:39 PMAlexandre A Barbosa
12/28/2022, 4:40 PMJacob
12/28/2022, 4:41 PM@KafkaListener(topics =["\${myTopicProperty}"]
Jacob
12/28/2022, 4:43 PMAlexandre A Barbosa
12/28/2022, 4:44 PMAlexandre A Barbosa
12/28/2022, 4:46 PMAlexandre A Barbosa
12/28/2022, 4:47 PMclass TopicNameValue {
companion object {
@Value("\${ingestion.config.topic.name}")
lateinit var topicIngestionName: String
}
}
Alexandre A Barbosa
12/28/2022, 4:47 PM@KafkaListener(topics =["\${topicIngestionName}"], groupId = "ingestion-consumer-groupid")
fun consumeIngestion(message: String) {
println("consumed message: $message")
}
Alexandre A Barbosa
12/28/2022, 5:24 PM@KafkaListener(
topics = ["#{'\${ingestion.config.topic.name}'.split(',')}"],
groupId = "ingestion-consumer-groupid")
fun consumeIngestion(message: String) {
println("consumed message: $message")
}
Alexandre A Barbosa
12/28/2022, 5:24 PM