Files
hmq/broker/bridge.go
2022-05-20 21:27:48 +08:00

18 lines
311 B
Go

package broker
import (
"github.com/fhmq/hmq/plugins/bridge"
"go.uber.org/zap"
)
func (b *Broker) Publish(e *bridge.Elements) bool {
if b.bridgeMQ != nil {
cost, err := b.bridgeMQ.Publish(e)
if err != nil {
log.Error("send message to mq error.", zap.Error(err))
}
return cost
}
return false
}