|
@@ -45,11 +45,10 @@ func Test_Producer(t *testing.T) {
|
|
|
E_time: time.Now().Unix(), //1605223065
|
|
|
E_app: "jywx_node",
|
|
|
}
|
|
|
- topicName := "jypoints"
|
|
|
// Synchronously publish a single message to the specified topic.
|
|
|
// Messages can also be sent asynchronously and/or in batches.
|
|
|
b, _ := json.Marshal(msg)
|
|
|
- err = producer.Publish(topicName, b)
|
|
|
+ err = producer.Publish("jy_event", b)
|
|
|
if err != nil {
|
|
|
log.Println(err)
|
|
|
return
|