Spring RabbitMq
spring-rabbitmq.xml文件内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:rabbit="http://www.springframework.org/schema/rabbit"
	xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/rabbit
http://www.springframework.org/schema/rabbit/spring-rabbit-1.2.xsd">
<!-- 连接服务配置 -->
	<rabbit:connection-factory id="connectionFactory"
		host="192.168.1.107" username="root" password="123456" port="5672" virtual-host="log_monitor_mq"/>
<!-- <rabbit:connection-factory id="connectionFactory"
		host="192.168.0.200" username="root" password="123456" port="5672" virtual-host="log_monitor_mq"/>
 -->
	<rabbit:admin connection-factory="connectionFactory" />
<!-- queue 队列声明 -->
	<rabbit:queue id="transfer_queue" durable="true" auto-delete="false"
		exclusive="false" name="transfer_queue" />
<!-- exchange queue binging key 绑定 -->
<rabbit:direct-exchange name="monitor_exchange"
		durable="true" auto-delete="false" id="monitor_exchange" auto-declare="true">
		<rabbit:bindings>
			<rabbit:binding queue="transfer_queue" key="transfer_queue_key" />
		</rabbit:bindings>
	</rabbit:direct-exchange>
<!-- spring amqp默认的是jackson
	的一个插件,目的将生产者生产的数据转换为json存入消息队列,由于fastjson的速度快于jackson,这里替换为fastjson的一个实现
	-->
	<bean id="jsonMessageConverter" class="org.springframework.amqp.support.converter.JsonMessageConverter" />
<!-- spring template声明-->
	<rabbit:template exchange="monitor_exchange" id="amqpTemplate"
		connection-factory="connectionFactory" message-converter="jsonMessageConverter" />
</beans>
Spring RabbitMq的更多相关文章
- Spring Rabbitmq HelloWorld实例
		之前的博客和大家分享了Rabbitmq的基本框架,及其工作原理,网址为 < http://www.cnblogs.com/jun-ma/p/4840869.html >.今天呢,想和大家一 ... 
- Spring rabbitMq 中 correlationId或CorrelationIdString  消费者获取为null的问题
		问题 在用Spring boot 的 spring-boot-starter-amqp 快速启动 rabbitMq 是遇到了个坑 消费者端获取不到:correlationId或Correlatio ... 
- Spring RabbitMq概述
		Spring AMQP consists of a handful of modules, each represented by a JAR in the distribution. These m ... 
- spring rabbitmq集成
		pom.xml加 <dependency> <groupId>com.rabbitmq</groupId> <artifactId>amqp-clien ... 
- Spring  RabbitMQ  延迟队列
		一.说明 在实际业务场景中可能会用到延时消息发送,例如异步回调失败时的重发机制. RabbitMQ本身不具有延时消息队列的功能,但是可以通过rabbitmq-delayed-message-excha ... 
- spring+rabbitmq+stomp搭建websocket消息推送(非spring boot方式)
		前言: 两年前做过spring+activemq+stomp的ws推送,那个做起来很简单,但现在公司用的mq中间件是rabbitmq,因此需要通过rabbitmq去做ws通信.仔细搜了搜百度/谷歌,网 ... 
- spring boot实战(第十二篇)整合RabbitMQ
		前言 最近几篇文章将围绕消息中间件RabbitMQ展开,对于RabbitMQ基本概念这里不阐述,主要讲解RabbitMQ的基本用法.Java客户端API介绍.spring Boot与RabbitMQ整 ... 
- spring boot / cloud (九) 使用rabbitmq消息中间件
		spring boot / cloud (九) 使用rabbitmq消息中间件 前言 rabbitmq介绍: RabbitMQ是一个在AMQP基础上完整的,可复用的企业消息系统.它可以用于大型软件系统 ... 
- Spring Boot(十三)RabbitMQ安装与集成
		一.前言 RabbitMQ是一个开源的消息代理软件(面向消息的中间件),它的核心作用就是创建消息队列,异步接收和发送消息,MQ的全程是:Message Queue中文的意思是消息队列. 1.1 使用场 ... 
随机推荐
- js中cookie
			document.cookie='address='+$("#address").val()+';path=/'; 
- 解决Android调用https服务API时出错的问题
			今天同事告诉我说他的应用调用我开发的API报异常了,原因跟SSL有关系,因为之前调试一直调用的是HTTP服务API,今天调试HTTPS服务API时报错了,并且找到了一篇文章让我看了一眼,文章中提到了W ... 
- Mongodb数据库加密存储(python)
			需求: 不知道大家有没有遇到过这样的需求:自己的服务器出于对数据库安全的保护,需要对存储的数据进行加密保护.这样万一数据库被人拿到,别人也不能拿到数据库里面的内容.这里还有一个前提:前端的展示页面是 ... 
- window常见事件
			<script type="text/javascript"> /*onunload = function(){ alert("onunload run&qu ... 
- 第三方支付过程中session失效问题
			第三方支付过程中session失效问题 时间 2015-05-13 12:36:23 IT社区推荐资讯 原文 http://itindex.net/detail/53436-session-问题 ... 
- ExtJS笔记   Proxy
			Proxies are used by Stores to handle the loading and saving of Model data. Usually developers will n ... 
- Elasticsearch学习笔记(一)
			批量建索引: curl -s -XPOST 'localhost:9200/_bulk' --data-binary @documents.json 查看索引mappingmyindex/_mappi ... 
- Linux下安装Redis3.2.4
			安装: 通过wget方式直接在linux上下载Redis $ wget http://download.redis.io/releases/redis-3.2.4.tar.gz , 默认下载到路径是r ... 
- 史上最臭名昭著五大软件Bug
			在现今数字年代,计算机bug不但困扰着每个程序员,更会无可避免影响我们的生活,小到每个人的衣食住行,大到国家经济,世界局势.随着我们的生活方式渐渐的数字化.互联网化,数字世界的找虫和杀虫就变得越来越重 ... 
- 对hashmap与hashcode()、equals()的理解
			1.equals方法没被重写的时候 比较的只是对象的地址 重写之后 比较的才是对象里的内容 2.重写equals的时候 务必需要重写hashcode 不然在用到容器的时候 会出现问题 因为容器会 ... 
