Package org.springframework.amqp.helloworld

Source Code of org.springframework.amqp.helloworld.BrokerConfigurationApplication

package org.springframework.amqp.helloworld;

import org.springframework.amqp.core.AmqpAdmin;
import org.springframework.amqp.core.Queue;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class BrokerConfigurationApplication {

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

  }

}
TOP

Related Classes of org.springframework.amqp.helloworld.BrokerConfigurationApplication

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.