1、修改@KafkaListener id topic为固定值

This commit is contained in:
Hao Miao
2024-02-01 16:02:24 +08:00
parent 6cab8d2fa5
commit 5af92950ee
2 changed files with 2 additions and 2 deletions

View File

@@ -15,7 +15,7 @@ public class KafkaConsumerService {
this.alertMessageService = alertMessageService;
}
@KafkaListener(id = "${spring.kafka.consumer.group-id}", topics = "${spring.kafka.consumer.topic-name}",
@KafkaListener(id = "AlertGroup", topics = "topic-alert",
errorHandler = "myKafkaListenerErrorHandler",
properties = {"spring.json.value.default.type=com.realtime.protection.configuration.entity.alert.AlertMessage"})
public void consume(AlertMessage alert, Acknowledgment ack) {