use of com.code.server.login.service.ClubServiceMsgDispatch in project summer by foxsugar.
the class UserServiceMsgConsumer method listen3.
@KafkaListener(id = "clubService", topicPattern = "clubService")
public void listen3(ConsumerRecord<String, String> record) {
String key = record.key();
String value = record.value();
KafkaMsgKey msgKey = JsonUtil.readValue(key, KafkaMsgKey.class);
JsonNode msgValue = JsonUtil.readTree(value);
ClubServiceMsgDispatch clubServiceMsgDispatch = SpringUtil.getBean(ClubServiceMsgDispatch.class);
clubServiceMsgDispatch.dispatchMsg(msgKey, msgValue);
}
Aggregations