Package org.springframework.amqp.rabbit.core

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


      Thread.sleep(100);
    }
    assertTrue(n < 100);

    bus.unbindConsumer("dlqtest", moduleInputChannel);
    admin.deleteQueue("xdbustest.dlqtest.dlq");
    admin.deleteQueue("xdbustest.dlqtest");
    admin.deleteExchange("xdbustest.DLX");
  }

  private SimpleMessageListenerContainer verifyContainer(AbstractEndpoint endpoint) {
View Full Code Here


    }
    assertTrue(n < 100);

    bus.unbindConsumer("dlqtest", moduleInputChannel);
    admin.deleteQueue("xdbustest.dlqtest.dlq");
    admin.deleteQueue("xdbustest.dlqtest");
    admin.deleteExchange("xdbustest.DLX");
  }

  private SimpleMessageListenerContainer verifyContainer(AbstractEndpoint endpoint) {
    SimpleMessageListenerContainer container;
View Full Code Here

  /**
   * Creates an instance of the queue on the rabbit broker. If already present then no action is taken.
   */
  public void destroyQueue() {
    RabbitAdmin admin = new RabbitAdmin(connectionFactory);
    admin.deleteQueue(queue);
  }

  /**
   * Sends data to the RabbitMQ Broker.
   *
 
View Full Code Here

        String queueName = queue.getName();

        if (purge) {
          logger.debug("Deleting queue: " + queueName);
          // Delete completely - gets rid of consumers and bindings as well
          admin.deleteQueue(queueName);
        }

        if (isDefaultQueue(queueName)) {
          // Just for test probe.
          admin.deleteQueue(queueName);
View Full Code Here

          admin.deleteQueue(queueName);
        }

        if (isDefaultQueue(queueName)) {
          // Just for test probe.
          admin.deleteQueue(queueName);
        }
        else {
          admin.declareQueue(queue);
        }
      }
View Full Code Here

    concurrentConsumers = 3;
    CountDownLatch latch = new CountDownLatch(messageCount);

    ConnectionFactory connectionFactory = createConnectionFactory();
    RabbitAdmin admin = new RabbitAdmin(connectionFactory);
    admin.deleteQueue("nonexistent");

    try {
      container = createContainer("nonexistent", new VanillaListener(latch), connectionFactory);
    }
    finally {
View Full Code Here

    concurrentConsumers = 1;
    CountDownLatch latch = new CountDownLatch(messageCount);

    ConnectionFactory connectionFactory = createConnectionFactory();
    RabbitAdmin admin = new RabbitAdmin(connectionFactory);
    admin.deleteQueue("nonexistent");
    try {
      container = createContainer("nonexistent", new VanillaListener(latch), connectionFactory);
    }
    finally {
      ((DisposableBean) connectionFactory).destroy();
View Full Code Here

    concurrentConsumers = 1;
    CountDownLatch latch = new CountDownLatch(messageCount);

    ConnectionFactory connectionFactory = createConnectionFactory();
    RabbitAdmin admin = new RabbitAdmin(connectionFactory);
    admin.deleteQueue("nonexistent");
    try {
      container = doCreateContainer("nonexistent", new VanillaListener(latch), connectionFactory);
      container.setMissingQueuesFatal(false);
      container.start();
      testRecoverMissingQueues(latch, connectionFactory);
View Full Code Here

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

  @Test
View Full Code Here

    concurrentConsumers = 1;
    CountDownLatch latch = new CountDownLatch(messageCount);

    ConnectionFactory connectionFactory = createConnectionFactory();
    RabbitAdmin admin = new RabbitAdmin(connectionFactory);
    admin.deleteQueue("nonexistent");
    try {
      container = doCreateContainer("nonexistent", new VanillaListener(latch), connectionFactory);
      Properties properties = new Properties();
      properties.setProperty("smlc.missing.queues.fatal", "false");
      GenericApplicationContext context = new GenericApplicationContext();
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.