Package org.springframework.amqp.core

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


  /**
   * 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

Related Classes of org.springframework.amqp.core.AmqpAdmin

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.