Examples of AmqpAdmin


Examples of org.springframework.amqp.core.AmqpAdmin

    connectionFactory.setUsername(svc_username);
    connectionFactory.setPassword(svc_passwd);
    connectionFactory.setVirtualHost(svc_vhost);

    String queueName = "CLOUD";
    AmqpAdmin amqpAdmin = new RabbitAdmin(connectionFactory);
    Queue cloudQueue = new Queue(queueName);
    amqpAdmin.declareQueue(cloudQueue);

    RabbitTemplate template = new RabbitTemplate(connectionFactory);
    template.setRoutingKey(queueName);
    template.setQueue(queueName);
    template.afterPropertiesSet();
View Full Code Here

Examples of org.springframework.amqp.core.AmqpAdmin

  /**
   * An example application that only configures the AMQP broker
   */
  public static void main(String[] args) throws Exception {
    ApplicationContext context = new ClassPathXmlApplicationContext("rabbitConfiguration.xml");
    AmqpAdmin amqpAdmin = context.getBean(AmqpAdmin.class);
    Queue helloWorldQueue = new Queue("hello.world.queue");
   
    amqpAdmin.declareQueue(helloWorldQueue);

  }
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.