allow bridge mq cost msg (#162)
This commit is contained in:
1 parent
92758c8c85
commit
5dc2114daf
7 files changed
+21
-14
No files matched your search
@@ -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)
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user