首页 > 其他 > 详细

RabbitMq笔记

时间:2020-06-09 11:22:14      阅读:28      评论:0      收藏:0      [点我收藏+]

对于生产者的消息推送的参数分析  

void basicPublish(String exchange, String routingKey, BasicProperties props, byte[] body) throws IOException;

void basicPublish(String exchange, String routingKey, boolean mandatory, BasicProperties props, byte[] body) throws IOException;

void basicPublish(String exchange, String routingKey, boolean mandatory, boolean immediate, BasicProperties props, byte[] body) throws IOException;

exchange:交换机

routingKey:路由键

mandatory:告诉服务器,至少将消息路由到一个队列中,否则消息返回给生产者

immediate:告诉服务器,如果该队列关联的队列上有消费者,则立即投递,若所有匹配的队列上都没有消费者,者直接将消息返回给生产者,不用将消息存到队列等待消费

 

RabbitMq笔记

原文:https://www.cnblogs.com/xining/p/13071304.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!