您的位置:首页 > 其它

文章标题

2016-01-24 20:33 239 查看

测试文章

测试CSDN文章格式和书写

代码

import java.io.IOException;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.client.MessageProperties;

/**
* 消息持久化
* @author menghh
*
*/
public class Send04 {

public static void main(String[] args) throws IOException {
ConnectionFactory factory = new ConnectionFactory();
//RabbitMQ-Server安装在本机,所以直接用127.0.0.1
factory.setHost("127.0.0.1");
//创建一个连接
Connection conn = factory.newConnection();
//创建一个通信通道
Channel channel = conn.createChannel();
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: