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

+3 -3
View File
@@ -63,7 +63,7 @@ func (k *kafka) connect() {
}
//Publish publish to kafka
func (k *kafka) Publish(e *Elements) error {
func (k *kafka) Publish(e *Elements) (bool, error) {
config := k.kafkaConfig
key := e.ClientID
topics := make(map[string]bool)
@@ -96,10 +96,10 @@ func (k *kafka) Publish(e *Elements) error {
topics[config.DisconnectTopic] = true
}
default:
return errors.New("error action: " + e.Action)
return false, errors.New("error action: " + e.Action)
}
return k.publish(topics, key, e)
return false, k.publish(topics, key, e)
}