package com.yeshi.fanli.util.mq.cmq;
|
|
import com.yeshi.fanli.log.LogHelper;
|
import com.yeshi.fanli.util.mq.rabbit.RabbitmqSenderUtil;
|
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
import org.springframework.stereotype.Component;
|
|
import javax.annotation.Resource;
|
|
@Component
|
public class HongBaoRecieveCMQManager {
|
|
@Resource
|
private RabbitTemplate rabbitTemplate;
|
|
private final static String TOPIC_NAME = "topic_hongbao";
|
|
public static String QUEUE_INTEGRAL = TOPIC_NAME + "_" + "integral";
|
|
public static String SUBSCRIBE_INTEGRAL = "integral";
|
|
/**
|
* 发布
|
*
|
* @param hongBaoId
|
*/
|
public void addHongBaoRecieveMsg(Long hongBaoId) {
|
if (hongBaoId == null)
|
return;
|
RabbitmqSenderUtil.sendExchangeMsg(rabbitTemplate,TOPIC_NAME,"*", hongBaoId + "");
|
LogHelper.test("红包消息投递成功");
|
}
|
|
}
|