Package org.springframework.amqp.rabbit.core

Examples of org.springframework.amqp.rabbit.core.RabbitAdmin.deleteQueue()


    }
    finally {
      if (container != null) {
        container.stop();
      }
      admin.deleteQueue("nonexistent");
      ((DisposableBean) connectionFactory).destroy();
    }
  }

  private void testRecoverMissingQueues(CountDownLatch latch, ConnectionFactory connectionFactory)
View Full Code Here


    Map<?,?> consumers = TestUtils.getPropertyValue(container, "consumers", Map.class);
    assertEquals(1, consumers.size());
    Object consumer = consumers.keySet().iterator().next();

    // delete the queue and verify we recover again when it is recreated.
    admin.deleteQueue("nonexistent");
    Thread.sleep(3000);
    latch = new CountDownLatch(messageCount);
    container.setMessageListener(new MessageListenerAdapter(new VanillaListener(latch)));
    assertEquals(messageCount, latch.getCount());
    admin.declareQueue(new Queue("nonexistent"));
View Full Code Here

    assertNotNull(queue);
    CachingConnectionFactory connectionFactory = new CachingConnectionFactory(BrokerTestUtils.getPort());
    connectionFactory.setHost("localhost");
    RabbitTemplate template = new RabbitTemplate(connectionFactory);
    RabbitAdmin rabbitAdmin = new RabbitAdmin(template.getConnectionFactory());
    rabbitAdmin.deleteQueue(queue.getName());
    rabbitAdmin.declareQueue(queue);

    assertEquals(100L, queue.getArguments().get("x-message-ttl"));
    template.convertAndSend(queue.getName(), "message");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.