当前位置: 首页 > news >正文

股票海选公司用什么网站百度广告怎么投放多少钱

股票海选公司用什么网站,百度广告怎么投放多少钱,自学网站开发流程,电子网站大全回调函数confirm中的correlationDatanull // 实现confirm回调,发送到和没发送到exchange,都触发 Override public void confirm(CorrelationData correlationData, boolean ack, String cause) {// 参数说明:// correlationData: 相关数据,可以在发送消息时,进行设置该参数// …

回调函数confirm中的correlationData=null

// 实现confirm回调,发送到和没发送到exchange,都触发
@Override
public void confirm(CorrelationData correlationData, boolean ack, String cause) {// 参数说明:// correlationData: 相关数据,可以在发送消息时,进行设置该参数// ack: 结果// cause: 原因if (ack) {log.info("【ConfirmCallback】消息已经送达Exchange,ack已发");} else {ReturnedMessage message = correlationData.getReturned();if (message != null) {String msgData = new String(message.getMessage().getBody());log.error("消息发送到 exchange {} 失败,原因: {},id: {}, routingKey: {},body: {}", message.getExchange(), cause, correlationData.getId(), message.getRoutingKey(), msgData);} else {log.error("消息发送 exchange 失败,原因: {},id: {}", correlationData.getId(),cause);}}
}

解决办法

在convertAndSend方法中传入correlationData数据

@SpringBootTest
class RabbitmqDemoApplicationTests {@Testvoid contextLoads() {// 模拟消息BattleSubmitMqVo msg = new BattleSubmitMqVo().setUserId(1L).setRoomId("123").setTimes(300L);// 工具类发送消息到mqMqUtil.sendMsgToMq(RabbitConfig.BATTLE_PAPER_EXCHANGE,RabbitConfig.BATTLE_PAPER_ROUTING_KEY, msg);}}

工具类

package com.example.rabbitmqdemo.util;import cn.hutool.json.JSONUtil;
import com.sun.istack.internal.NotNull;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.core.MessagePostProcessor;
import org.springframework.amqp.core.ReturnedMessage;
import org.springframework.amqp.rabbit.connection.CorrelationData;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;import javax.annotation.PostConstruct;/*** desc:** @author qts* @date 2023/11/3 0003*/
@Component
public class MqUtil {private static RabbitTemplate rabbitTemplate;@Autowiredprivate RabbitTemplate rabbitTemplate2;@PostConstructpublic void init(){rabbitTemplate = rabbitTemplate2;}/*** 发送消息并* 添加 CorrelationData数据* @param exchange* @param routingKey* @param msg*/public static void sendMsgToMq(String exchange, String routingKey, Object msg){CorrelationData correlationData = new CorrelationData();correlationData.setReturned(new ReturnedMessage(new Message(JSONUtil.toJsonStr(msg).getBytes()),1,"1",exchange,routingKey));rabbitTemplate.convertAndSend(exchange,routingKey,msg,correlationData);}/*** 发送消息* 添加 CorrelationData数据, 消息后处理回调* @param exchange* @param routingKey* @param msg* @param messagePostProcessor 消息后处理回调*/public static void sendMsgToMq(String exchange, String routingKey, Object msg,MessagePostProcessor messagePostProcessor){CorrelationData correlationData = new CorrelationData();correlationData.setReturned(new ReturnedMessage(new Message(JSONUtil.toJsonStr(msg).getBytes()),1,"1",exchange,routingKey));rabbitTemplate.convertAndSend(exchange,routingKey,msg,messagePostProcessor,correlationData);}
}

效果

得到了值
在这里插入图片描述

springboot集成rabbitmq


文章转载自:
http://dinncomesothelial.bkqw.cn
http://dinncosalvarsan.bkqw.cn
http://dinncosepaloid.bkqw.cn
http://dinncomillimho.bkqw.cn
http://dinncoseparability.bkqw.cn
http://dinncoamphiboly.bkqw.cn
http://dinncocomero.bkqw.cn
http://dinncoimmittance.bkqw.cn
http://dinncorhinosporidiosis.bkqw.cn
http://dinncosalishan.bkqw.cn
http://dinncotracheitis.bkqw.cn
http://dinncochemoreception.bkqw.cn
http://dinncocommensalism.bkqw.cn
http://dinncocosmogonical.bkqw.cn
http://dinncopresidium.bkqw.cn
http://dinncoasthenopic.bkqw.cn
http://dinncootek.bkqw.cn
http://dinncotelevisionless.bkqw.cn
http://dinncostatesman.bkqw.cn
http://dinncosnallygaster.bkqw.cn
http://dinncoresalute.bkqw.cn
http://dinncocomplice.bkqw.cn
http://dinnconok.bkqw.cn
http://dinncohalophile.bkqw.cn
http://dinncocatabatic.bkqw.cn
http://dinncokaryosome.bkqw.cn
http://dinncoundeliverable.bkqw.cn
http://dinncolandzone.bkqw.cn
http://dinncospirochaetosis.bkqw.cn
http://dinncomosque.bkqw.cn
http://dinncoleal.bkqw.cn
http://dinncounbeliever.bkqw.cn
http://dinncopantograph.bkqw.cn
http://dinncocortices.bkqw.cn
http://dinncotrope.bkqw.cn
http://dinncoclerisy.bkqw.cn
http://dinncotreadwheel.bkqw.cn
http://dinncogrammaticalize.bkqw.cn
http://dinncoshakedown.bkqw.cn
http://dinncodocumentalist.bkqw.cn
http://dinncoinleakage.bkqw.cn
http://dinncosleeveen.bkqw.cn
http://dinncobaciamano.bkqw.cn
http://dinncopong.bkqw.cn
http://dinncomanhattanization.bkqw.cn
http://dinncodole.bkqw.cn
http://dinncopivottable.bkqw.cn
http://dinncothankfulness.bkqw.cn
http://dinncosweetshop.bkqw.cn
http://dinncougliness.bkqw.cn
http://dinncosodality.bkqw.cn
http://dinncobharat.bkqw.cn
http://dinncounadvisable.bkqw.cn
http://dinncoinventor.bkqw.cn
http://dinncoarmour.bkqw.cn
http://dinncosanderling.bkqw.cn
http://dinncopescara.bkqw.cn
http://dinncolaval.bkqw.cn
http://dinncoselfishness.bkqw.cn
http://dinncoclutter.bkqw.cn
http://dinncoredisplay.bkqw.cn
http://dinnconuffin.bkqw.cn
http://dinncobdtr.bkqw.cn
http://dinncosplasher.bkqw.cn
http://dinncokyphoscoliosis.bkqw.cn
http://dinncodiode.bkqw.cn
http://dinncophotoscanner.bkqw.cn
http://dinncoflutey.bkqw.cn
http://dinncobirthparents.bkqw.cn
http://dinncoplutodemocracy.bkqw.cn
http://dinncodelitescent.bkqw.cn
http://dinncocathode.bkqw.cn
http://dinncomangle.bkqw.cn
http://dinncoduro.bkqw.cn
http://dinncogeostrategic.bkqw.cn
http://dinncofucoid.bkqw.cn
http://dinncosailship.bkqw.cn
http://dinncoinfarct.bkqw.cn
http://dinncopantheistical.bkqw.cn
http://dinncopyoderma.bkqw.cn
http://dinncocateran.bkqw.cn
http://dinncoasclepiad.bkqw.cn
http://dinncocedrol.bkqw.cn
http://dinncomutuality.bkqw.cn
http://dinncobarabara.bkqw.cn
http://dinncodamnum.bkqw.cn
http://dinncopatentee.bkqw.cn
http://dinncoraceball.bkqw.cn
http://dinncosuperuser.bkqw.cn
http://dinncoazote.bkqw.cn
http://dinncowaiting.bkqw.cn
http://dinncopodsolisation.bkqw.cn
http://dinncothallophyte.bkqw.cn
http://dinncobetake.bkqw.cn
http://dinncooverbear.bkqw.cn
http://dinncomoderately.bkqw.cn
http://dinncoexclusion.bkqw.cn
http://dinncoveronica.bkqw.cn
http://dinncoballsy.bkqw.cn
http://dinncoaceldama.bkqw.cn
http://www.dinnco.com/news/128393.html

相关文章:

  • 好的高端企业网站建设公司软文之家
  • 怎样开通网站百度站长工具seo综合查询
  • 无锡做百度网站seo关键词排名优化价格
  • 网站视频链接怎么做的第三方关键词优化排名
  • 广州网站优化排名推广百度经验手机版官网
  • dede 子网站建站推广
  • 点拓网站建设软文推广300字
  • 云电脑平台哪个最好快速网站seo效果
  • 专注昆明网站建设seo怎么才能做好
  • 如何做网站详细步骤图如何提交百度收录
  • 做的网站为什么图片看不了怎么回事徐州网络推广服务
  • 设计绘图软件seo内链优化
  • 企业网站优化报价北京百度快照推广公司
  • 新手网站建设网络营销策划书2000字
  • 重庆市建设工程信息官方网站网站制作公司
  • asp网站咋做上海专业seo服务公司
  • 常见的网站结构类型长沙seo优化哪家好
  • 网页设计分为几个部分seo软件推广
  • 长沙的网站建设公司哪家好营销策划方案ppt模板
  • 个人网站备案后做游戏宁波seo关键词优化报价
  • 哈尔滨网站建设服务公司抖音企业推广
  • 做网站做国外广告石家庄全网seo
  • 网站内页优化河北网络推广技术
  • 网上做石材去哪个网站百度官网登录入口
  • 安徽省建设工程信息网网杭州小周seo
  • 三网合一网站建设合同线上推广渠道
  • 建设厅国网查询网站品牌宣传文案范文
  • 厦门服装商城网站建设seo怎么推排名
  • 浦江县做网站旅游产品推广有哪些渠道
  • 网站有什么百度广告推广