From 38269e162b53372c60b7fb5238e0071bb816c994 Mon Sep 17 00:00:00 2001
From: fengxiang <fengxiang@blit.7drlb>
Date: Tue, 31 Oct 2017 17:07:03 +0800
Subject: [PATCH] api修正
---
src/main/resources/rabbitmq.xml | 41 ++++++++++++++++++++++++++++++-----------
1 files changed, 30 insertions(+), 11 deletions(-)
diff --git a/src/main/resources/rabbitmq.xml b/src/main/resources/rabbitmq.xml
index 46818cf..f873d9d 100644
--- a/src/main/resources/rabbitmq.xml
+++ b/src/main/resources/rabbitmq.xml
@@ -5,29 +5,48 @@
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/rabbit http://www.springframework.org/schema/rabbit/spring-rabbit-1.0.xsd "
default-autowire="byName">
+
<!-- rabbitMQ������ -->
<bean id="rabbitConnectionFactory" class="org.springframework.amqp.rabbit.connection.CachingConnectionFactory">
- <constructor-arg value="101.37.22.173"/>
+ <constructor-arg value="116.62.12.115"/>
<property name="username" value="guest"/>
<property name="password" value="guest"/>
<property name="channelCacheSize" value="8"/>
<property name="port" value="5672"/>
</bean>
+
<rabbit:admin connection-factory="rabbitConnectionFactory"/>
-
- <rabbit:queue name="monitor" durable="false" exclusive="false" auto-delete="false" />
-
- <!--<bean id="amqpMsgListener" class="com.moral.monitor.listener.MonitorListener"/>-->
-
- <bean id="amqpMsgListener" class="com.moral.monitor.listener.Listener"/>
- <rabbit:listener-container connection-factory="rabbitConnectionFactory" acknowledge="auto" >
- <rabbit:listener queues="monitor" ref="amqpMsgListener" />
- </rabbit:listener-container>
<bean id="rabbitTemplate" class="org.springframework.amqp.rabbit.core.RabbitTemplate">
<constructor-arg ref="rabbitConnectionFactory"></constructor-arg>
</bean>
- <rabbit:fanout-exchange name="exchange_alarm" durable="false" xmlns="http://www.springframework.org/schema/rabbit">
+ <rabbit:fanout-exchange name="devices_data" durable="true" auto-delete="false">
+ <rabbit:bindings>
+ <rabbit:binding queue="devices_storage_data"></rabbit:binding>
+ </rabbit:bindings>
</rabbit:fanout-exchange>
+
+ <rabbit:queue name="devices_storage_data" durable="true" auto-delete="false" exclusive="false"/>
+
+ <bean id="amqpMsgListener" class="com.moral.monitor.listener.TaskListener"/>
+
+ <rabbit:listener-container connection-factory="rabbitConnectionFactory" acknowledge="auto" >
+ <rabbit:listener queues="devices_storage_data" ref="amqpMsgListener" />
+ </rabbit:listener-container>
+
+ <rabbit:fanout-exchange name="monitors_data2" durable="true" auto-delete="false">
+ <rabbit:bindings>
+ <rabbit:binding queue="monitors_storage_data2"></rabbit:binding>
+ </rabbit:bindings>
+ </rabbit:fanout-exchange>
+
+ <rabbit:queue name="monitors_storage_data2" durable="false" auto-delete="true" exclusive="false" />
+
+ <!--http://blog.csdn.net/u012204058/article/details/54292888-->
+ <!--http://blog.csdn.net/itmrchen/article/details/53285648-->
+
+ <!--<rabbit:queue name="monitors_storage_alarm" durable="true" auto-delete="false" exclusive="false" />-->
+
+ <!--<rabbit:fanout-exchange name="monitors_alarm" durable="true" auto-delete="false" />-->
</beans>
\ No newline at end of file
--
Gitblit v1.8.0