数据冷热分离pojo

yun-zuoyi
castle.zang 4 years ago
parent ea8ec0ed18
commit f1baa54b32

@ -0,0 +1,52 @@
package cn.estsh.i3plus.core.apiservice.mq;
import cn.estsh.i3plus.platform.common.util.CommonConstWords;
import cn.estsh.impp.framework.boot.util.ImppRedis;
import com.rabbitmq.client.Channel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.core.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import javax.annotation.Resource;
import static cn.estsh.i3plus.platform.common.util.PlatformConstWords.QUEUE_IMPP_DATA_SEPARATOR;
/**
* @Description :
* @Reference :
* @Author : Castle
* @CreateDate : 2021/9/23 13:19
* @Modify:
**/
@Configuration
@ConditionalOnExpression(" '${impp.mq.queue.data.separator:false}' == 'true' ")
public class DataSeparatorQueueReceiver {
private static final Logger LOGGER = LoggerFactory.getLogger(DataSeparatorQueueReceiver.class);
@Resource(name = CommonConstWords.IMPP_REDIS_RES)
private ImppRedis redisRes;
/**
* QUEUE_SWEB_NOTICE
*
* @return
* @throws Exception
*/
@Bean
public Queue getQueueSwebNoticeQueue() {
return new Queue(QUEUE_IMPP_DATA_SEPARATOR);
}
@RabbitListener(queues = QUEUE_IMPP_DATA_SEPARATOR)
public Boolean consumer(Channel channel, Message message){
byte[] msg = message.getBody();
return false;
}
}
Loading…
Cancel
Save