| | |
| | | import com.xcong.excoin.configurations.RabbitMqConfig; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.amqp.rabbit.annotation.RabbitListener; |
| | | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Slf4j |
| | | @Component |
| | | @ConditionalOnProperty(prefix = "app", name = "otc-job", havingValue = "true") |
| | | public class OtcConsumer { |
| | | |
| | | |
| | | @RabbitListener(queues = RabbitMqConfig.QUEUE_MARKET_BUSSINESS) |
| | | // @RabbitListener(queues = RabbitMqConfig.QUEUE_MARKET_BUSSINESS) |
| | | public void marketBussiness(String content) { |
| | | log.info("---->{}", content); |
| | | } |
| | | |
| | | |
| | | @RabbitListener(queues = RabbitMqConfig.QUEUE_DELAY) |
| | | public void delayOrder(String content) { |
| | | log.info("--{}-->{}", new Date(), content); |
| | | } |
| | | } |