diff --git a/modules/i3plus-core-apiservice/src/main/java/cn/estsh/i3plus/core/apiservice/mq/DataSeparatorQueueReceiver.java b/modules/i3plus-core-apiservice/src/main/java/cn/estsh/i3plus/core/apiservice/mq/DataSeparatorQueueReceiver.java new file mode 100644 index 0000000..0304696 --- /dev/null +++ b/modules/i3plus-core-apiservice/src/main/java/cn/estsh/i3plus/core/apiservice/mq/DataSeparatorQueueReceiver.java @@ -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; + } +}