This commit is contained in:
joy.zhou
2019-07-15 19:19:00 +08:00
parent 0980109fdf
commit 1586a67dde

View File

@@ -3,7 +3,6 @@ package kafka
import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"regexp"
"time"
@@ -94,11 +93,9 @@ func Publish(e *plugins.Elements) {
if err != nil {
log.Error("publish kafka error: ", zap.Error(err))
}
fmt.Println("------------", topic)
match, _ := regexp.MatchString(_ThingModelTopicRegexp, topic)
if match {
fmt.Println("------------11111")
match, _ := regexp.MatchString(_ThingModelTopicRegexp, e.Topic)
if match && e.Action == plugins.Publish {
topic := "tmodel.msg.upstream"
err := publish(topic, key, e)
if err != nil {