OrcSwitchUpdateConsumer.java
1.24 KB
package com.yohoufo.user.consumer;
import com.yoho.core.rabbitmq.YhConsumer;
import com.yohoufo.user.component.CertPhotoSwitchComponent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class OrcSwitchUpdateConsumer implements YhConsumer {
private static final Logger LOGGER = LoggerFactory.getLogger(CertPhotoSwitchComponent.class);
private final String topic = "reviewed.ocr.limit";
@Autowired
private CertPhotoSwitchComponent certPhotoSwitchComponent;
public String getMessageTopic() {
return topic;
}
@Override
public void handleMessage(Object message) {
try {
LOGGER.info("begin handle express info update message, message is {}. topic {}", message,getMessageTopic());
certPhotoSwitchComponent.writeZkValueToFalse();
LOGGER.info("handle express info update message success, message is {}.", message);
} catch (Exception e) {
LOGGER.warn("handle express info update message fail, message is {}.", message);
LOGGER.error("handleMessage error = ", e);
}
}
}