Package amqp

Source Code of amqp.RabbitDemo

package amqp;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class RabbitDemo {

  public static void main(String[] args) {
    ApplicationContext context = new ClassPathXmlApplicationContext("amqp/config.xml");
    AmqpTemplate template = context.getBean(AmqpTemplate.class);
    template.convertAndSend("samples.queue", "Hello AMQP");
  }

}
TOP

Related Classes of amqp.RabbitDemo

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.