RabbitMQ与AMQP协议详解可以看看这个 http://www.cnblogs.com/frankyou/p/5283539.html
下面是rabbitMQ和spring集成的配置,我配置了二种ExCahange: topicExchange和directExChange
<?xml version="1.0" encoding="UTF-8"?> Spring公共配置
生成者demo例子 :
@Controller @RequestMapping("/amqpTest") public class AmqpTestController { @Autowired private AmqpTemplate amqpTemplate; @RequestMapping("/sendMsg") @ResponseBody public String sendAmqbMsg(Model model,@RequestParam(value="msg