Uploaded image for project: 'Spring AMQP'
  1. Spring AMQP
  2. AMQP-311

Queues are created in passive mode, I don't see a "passive" flag in XML.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Invalid
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      http://stackoverflow.com/questions/16370911/how-to-get-spring-rabbitmq-to-create-a-new-queue/16371103?noredirect=1#comment23496325_16371103

      Using this xml:

      <rabbit:connection-factory id="rabbitConnectionFactory" host="172.16.45.1" username="test" password="password" />
      
      <rabbit:listener-container connection-factory="rabbitConnectionFactory"  >
          <rabbit:listener ref="testQueueListener" queue-names="test" />
      </rabbit:listener-container>
      
      <bean id="testQueueListener" class="com.levelsbeyond.rabbit.TestQueueListener"> 
      </bean>
      

      I see this error in RMQ:

      =ERROR REPORT==== 3-May-2013::23:17:24 ===
      connection <0.1652.0>, channel 1 - soft error:
      {amqp_error,not_found,"no queue 'test' in vhost '/'",'queue.declare'}
      

      I don't see a way to change the "passive" flag on the queue element, which is what I would expect to be able to do. Instead, adding an "admin" seems to fix it:

      <rabbit:listener-container connection-factory="rabbitConnectionFactory"  >
          <rabbit:listener ref="testQueueListener" queues="test" />
      </rabbit:listener-container>
      
      <rabbit:queue name="test"></rabbit:queue>
      
      <rabbit:admin id="amqpAdmin" connection-factory="rabbitConnectionFactory"/>
      
      <bean id="testQueueListener" class="com.levelsbeyond.rabbit.testQueueListener">   
      </bean>
      

      is this expected behavior? Should there be an "active" attribute on queue?

        Attachments

          Activity

            People

            • Assignee:
              grussell Gary Russell
              Reporter:
              ericdcobb Eric Cobb
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: