当前位置:   article > 正文

通过xml方式配置Rabbitmq_xml 動態rabbitmq隊列配置

xml 動態rabbitmq隊列配置

基于 spring 4.3.16.RELEASE和spring-rabbit 1.7.8.RELEASE

     <dependency>
            <groupId>org.springframework.amqp</groupId>
            <artifactId>spring-rabbit</artifactId>
            <version>1.7.8.RELEASE</version>
     </dependency>

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

对于队列参数值的类型需要小心,必须单独指定,具体可见配置死信队列ttl超时时间出的方式

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rabbit="http://www.springframework.org/schema/rabbit"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans.xsd
    http://www.springframework.org/schema/rabbit    http://www.springframework.org/schema/rabbit/spring-rabbit-1.7.xsd">

    <bean id="jsonMessageConverter" class="org.springframework.amqp.support.converter.Jackson2JsonMessageConverter" />

    <rabbit:connection-factory
            id="connectionFactory"
            host="127.0.0.1"
            port&
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/139231
推荐阅读
相关标签
  

闽ICP备14008679号