func (a *MqttAdaptor) Publish(topic string, message []byte) bool {
	if a.client == nil {
		return false
	}
	a.client.Publish(topic, 0, false, message)
	return true
}
Publish a message under a specific topic
package mqtt
import (
	"git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git"
)
type MqttAdaptor struct {
	name     string
	Host     string
	clientID string
	username string
	password string
	client   *mqtt.Client
}
func NewMqttAdaptor(name string, host string, clientID string) *MqttAdaptor {
	return &MqttAdaptor{
		name:     name,
		Host:     host,
		clientID: clientID,
	}
}
func NewMqttAdaptorWithAuth(name, host, clientID, username, password string) *MqttAdaptor {
	return &MqttAdaptor{
		name:     name,
		Host:     host,
		clientID: clientID,
		username: username,
		password: password,
	}
}
func (a *MqttAdaptor) Name() string { return a.name }
func (a *MqttAdaptor) Connect() (errs []error) {
	a.client = mqtt.NewClient(createClientOptions(a.clientID, a.Host, a.username, a.password))
	if token := a.client.Connect(); token.Wait() && token.Error() != nil {
		errs = append(errs, token.Error())
	}
	return
}
func (a *MqttAdaptor) Disconnect() (err error) {
	if a.client != nil {
		a.client.Disconnect(500)
	}
	return
}
func (a *MqttAdaptor) Finalize() (errs []error) {
	a.Disconnect()
	return
}