package mq

import (
	"testing"
)

func TestMq(t *testing.T) {
	mq, err := NewMq([]string{"192.168.0.198:4224"}, "streaming1", "streaming1", "kg_stream", "mq_test")
	if nil != err {
		t.Error(err.Error())
		return
	}
	defer mq.Close()

	err = mq.Pub("ev.test", []byte("hello,ppp"))
	err = mq.Pub("ev.test", []byte("hello,qqq"))
	if err != nil {
		t.Error(err)
		return
	}
}
