allow bridge mq cost msg (#162)

This commit is contained in:
ZhangJian He authored and GitHub committed 2022-05-20 21:27:48 +08:00
1 parent 92758c8c85
commit 5dc2114daf
7 files changed
+21 -14

No files matched your search

+4 -2
View File
@@ -5,11 +5,13 @@ import (
"go.uber.org/zap"
)
func (b *Broker) Publish(e *bridge.Elements) {
func (b *Broker) Publish(e *bridge.Elements) bool {
if b.bridgeMQ != nil {
err := b.bridgeMQ.Publish(e)
cost, err := b.bridgeMQ.Publish(e)
if err != nil {
log.Error("send message to mq error.", zap.Error(err))
}
return cost
}
return false
}