How to get Spring RabbitMQ to create a new Queue?

前端 未结 4 642
长发绾君心
长发绾君心 2020-12-06 09:46

In my (limited) experience with rabbit-mq, if you create a new listener for a queue that doesn\'t exist yet, the queue is automatically created. I\'m trying to use the Sprin

4条回答
  •  鱼传尺愫
    2020-12-06 10:12

    Can you add this after your connection tag, but before the listener:

    
    

    Unfortunately, according to the XSD schema, the passive attribute (listed above) is not valid. However, in every queue_declare implementation I've seen, passive has been a valid queue_declare parameter. I'm curious to see whether that will work or whether they plan to support it in future.

    Here is the full list of options for a queue declaration: http://www.rabbitmq.com/amqp-0-9-1-reference.html#class.queue

    And here is the full XSD for the spring rabbit schema (with comments included): http://www.springframework.org/schema/rabbit/spring-rabbit-1.0.xsd

提交回复
热议问题