1.下载相应的版本安装:http://www.rabbitmq.com/download.htmleg:http://www.rabbitmq.com/releases/rabbitmq-server/v3.5.1/rabbitmq-server_3.5.1-1_all.deb2.安装web管理插件rabbitmq在ubuntu下路径:/etc/rabbitmq /usr/lib/rabbitmqeg:cd /usr/lib/rabbitmq/binsudo rabbitmq-plugins e
1.创建Maven工程,pom.xml引入依赖: <dependency> <groupId>com.rabbitmq</groupId> <artifactId>amqp-client</artifactId> <version>4.1.0</version> </dependency> 2.生产者: public class MyProducer { private final static String
1.Channel 1.1 channel.exchangeDeclare(): type:有direct.fanout.topic三种durable:true.false true:服务器重启会保留下来Exchange.警告:仅设置此选项,不代表消息持久化.即不保证重启后消息还在.原文:true if we are declaring a durable exchange (the exchange will survive a server restart)autoDelete:true.f
// The contents of this file are subject to the Mozilla Public License // Version 1.1 (the "License"); you may not use this file except in // compliance with the License. You may obtain a copy of the License // at http://www.mozilla.org/MPL/ //