| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.amqp.rabbit.annotation.RabbitListener; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | |
| | | **/ |
| | | @Slf4j |
| | | @Component |
| | | @ConditionalOnProperty(prefix = "consumer", name = "open", havingValue = "true") |
| | | public class AgentConsumer { |
| | | @Autowired |
| | | private IAgentService agentService; |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 节点升级 |
| | | */ |
| | | @RabbitListener(queues = QueueConstants.RUN_VIP_NODE_UP) |
| | | public void nodeUpMsg(Long memberId) { |
| | | try { |
| | | agentService.nodeUpMsg(memberId); |
| | | } catch (Exception e) { |
| | | log.error("消费节点升级异常", e); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |