随笔分类 - MQ
摘要:消息何去何从 mandatory 和 immediate 是 channel . basicPublish 方法中的两个参数,它们都有 当消息传递过程中不可达目的地时将消息返回给生产者的功能。 当 mandatory 参数设为 true 时,交换器无法根据自身的类型和路由键找到一个符合条件 的队列,
阅读全文
摘要:几个基本概念 Producer 生产者,发送消息的一方,图中左侧的client。 Consumer 消费者,接收消息的一方,图中后侧的client。 Broker 消息中间件的服务节点,一般一个RabbitMQ Broker看成一台RabbitMQ服务器。 消息 消息包含两部分:消息体和标签。消息体
阅读全文
摘要:1. 消费端集群消费(负载均衡) 示例代码: /** * Producer,发送消息 * */ public class Producer { public static void main(String[] args) throws MQClientException, InterruptedEx
阅读全文
摘要:双Master方式: 服务器环境 Helloworld代码示例: /** * Producer,发送消息 * */ public class Producer { public static void main(String[] args) throws MQClientException, Int
阅读全文

浙公网安备 33010602011771号