Helius
2021-05-21 565db646d1f2e5ba8e680f97555dd6b18623bbde
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package com.xcong.excoin.rabbit.consumer;
 
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;
 
@Slf4j
@Component
@ConditionalOnProperty(prefix = "app", name = "otc-job", havingValue = "true")
public class OtcConsumer {
 
 
    @RabbitListener(queues = RabbitMqConfig.QUEUE_MARKET_BUSSINESS)
    public void marketBussiness(String content) {
        log.info("---->{}", content);
    }
}