首页 > TAG信息列表 > RabbbitMQ

RabbbitMQ客户端发布消息

1、客户端lib <dependency> <groupId>com.rabbitmq</groupId> <artifactId>amqp-client</artifactId> <version>5.15.0</version> </dependency> 2、获取连接和信道 //1、设置连接工厂 ConnectionFactory factory = new ConnectionFa

RabbbitMQ配置mandatory

官网文档解释: If a message is published with the "mandatory" flags set, but cannot be routed, the broker will return it to the sending client (via an AMQP.Basic.Return command). To be notified of such returns, clients can implement the ReturnListener