Package org.springframework.amqp.rabbit.core

Examples of org.springframework.amqp.rabbit.core.RabbitAdmin


        }
       
        if(this.amqpAdministration == null || this.amqpAdministration.isEmpty()) {
            //Attempt to construct an AMQP Adminstration instance
            this.amqpAdministration = new HashMap<String, AmqpAdmin>();
            this.amqpAdministration.put(DEFAULT_CONNECTION, new RabbitAdmin(this.connectionFactory.values().iterator().next()));
            LOG.info("Created new AMQP Administration instance");
        }
       
        return this.amqpAdministration;
    }
View Full Code Here


  @Bean
  @ConditionalOnProperty(prefix = "spring.rabbitmq", name = "dynamic", matchIfMissing = true)
  @ConditionalOnMissingBean(AmqpAdmin.class)
  public AmqpAdmin amqpAdmin(CachingConnectionFactory connectionFactory) {
    return new RabbitAdmin(connectionFactory);
  }
View Full Code Here

    RabbitTemplate rabbitTemplate = this.context.getBean(RabbitTemplate.class);
    RabbitMessagingTemplate messagingTemplate = this.context
        .getBean(RabbitMessagingTemplate.class);
    CachingConnectionFactory connectionFactory = this.context
        .getBean(CachingConnectionFactory.class);
    RabbitAdmin amqpAdmin = this.context.getBean(RabbitAdmin.class);
    assertEquals(connectionFactory, rabbitTemplate.getConnectionFactory());
    assertEquals(rabbitTemplate, messagingTemplate.getRabbitTemplate());
    assertNotNull(amqpAdmin);
    assertEquals("localhost", connectionFactory.getHost());
    assertTrue("Listener container factory should be created by default",
View Full Code Here

        return new JsonMessageConverter();
    }
 
  @Bean
  public AmqpAdmin amqpAdmin() {
    return new RabbitAdmin(connectionFactory());
  }
View Full Code Here

  /**
   * @return the admin bean that can declare queues etc.
   */
  @Bean
  public AmqpAdmin amqpAdmin() {
    RabbitAdmin rabbitAdmin = new RabbitAdmin(connectionFactory);
    return rabbitAdmin ;
  }
View Full Code Here

  }
 
  @RequestMapping(value = "/purge", method = RequestMethod.GET)
  @ResponseBody
  public String purgeQueue() {
    RabbitAdmin admin = new RabbitAdmin(rabbitTemplate.getConnectionFactory());   
    admin.purgeQueue(QueueNames.WORK_QUEUE_NAME, true);
    admin.purgeQueue(QueueNames.RESULT_QUEUE_NAME, true);
    return QueueNames.WORK_QUEUE_NAME + "and " + QueueNames.RESULT_QUEUE_NAME + " queues were purged.";
       
  }
View Full Code Here

        return new JsonMessageConverter();
    }
 
  @Bean
  public AmqpAdmin amqpAdmin() {
    return new RabbitAdmin(connectionFactory());
  }
View Full Code Here

        return factory;
    }

    @Bean
    public AmqpAdmin amqpAdmin() {
        return new RabbitAdmin(connectionFactory());
    }
View Full Code Here

  }

  public void setConnectionFactory(ConnectionFactory connectionFactory) {
    this.connectionFactory = connectionFactory;
    this.rabbitTemplate = new RabbitTemplate(connectionFactory);
    this.rabbitAdmin = new RabbitAdmin(connectionFactory);
  }
View Full Code Here

        }
       
        if(this.amqpAdministration == null || this.amqpAdministration.isEmpty()) {
            //Attempt to construct an AMQP Adminstration instance
            this.amqpAdministration = new HashMap<String, AmqpAdmin>();
            this.amqpAdministration.put(DEFAULT_CONNECTION, new RabbitAdmin(this.connectionFactory.values().iterator().next()));
            LOG.info("Created new AMQP Administration instance");
        }
       
        return this.amqpAdministration;
    }
View Full Code Here

TOP

Related Classes of org.springframework.amqp.rabbit.core.RabbitAdmin

Copyright © 2018 www.massapicom. 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.