工业级运维app手机api
fengxiang
2017-10-25 3ac50e5eb9e1813d1c6b9e100d56adab7b2eb8e3
src/main/resources/rabbitmq.xml
@@ -5,6 +5,7 @@
       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"/>
@@ -13,13 +14,15 @@
        <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"    />
    <rabbit:queue  name="monitors_storage_data" 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>
@@ -28,6 +31,5 @@
        <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>
    <rabbit:fanout-exchange name="exchange_alarm" durable="false"  xmlns="http://www.springframework.org/schema/rabbit"></rabbit:fanout-exchange>
</beans>