@Override
public void sendUploadOssAndRiskDanger(String uuid, Object objectData) {
try {
rabbitTemplate.setConfirmCallback(this);
rabbitTemplate.setReturnCallback(this);
// rabbitTemplate.convertAndSend(RabbitQueueNameCode.RABBIT_EXCHANGE,
// RabbitQueueNameCode.RABBIT_ROUTING_KEY_UPLOAD_RISK_DANGER_KEY, objectData, correlationId);
// MessageProperties properties=new MessageProperties();
// properties.setContentType(MessageProperties.DEFAULT_CONTENT_TYPE);
// properties.setDeliveryMode(MessageProperties.DEFAULT_DELIVERY_MODE);//持久化设置
// properties.setExpiration("2019-11-13 22:23:23");//设置到期时间
// Message message=new Message(objectData.toString().getBytes(),properties);
// this.rabbitTemplate.sendAndReceive(RabbitQueueNameCode.RABBIT_EXCHANGE,RabbitQueueNameCode.RABBIT_ROUTING_KEY_UPLOAD_RISK_DANGER_KEY,message);

} catch (Exception ex) {
logger.info("CommonMqSendServiceImpl sendUploadOssAndRiskDanger ex={} objectData={}", ex, objectData);
}
}
posted on 2019-11-13 22:26  微笑点燃希望  阅读(443)  评论(0编辑  收藏  举报
font=white