package com.yihu.hos.arbiter.services;

import org.junit.Test;
import org.zbus.broker.ZbusBroker;
import org.zbus.mq.Producer;
import org.zbus.net.http.Message;

/**
 * @author Airhead
 * @since 2016/12/22.
 */
public class ProxyServiceTest {
    @Test
    public void proxy() throws Exception {
        Producer producer = new Producer(new ZbusBroker("192.168.131.38:15555"), "RemoteControl");
        producer.createMQ();//确定为创建消息队列需要显示调用
        Message msg = new Message();
        msg.setBody("hello world"); //消息体底层是byte[]
        msg = producer.sendSync(msg);
    }

}