log message id

This commit is contained in:
w1ndyb0y
2021-02-01 16:09:35 +08:00
parent d570e6cee8
commit 980c52c940
+2 -1
View File
@@ -42,10 +42,11 @@ func create() {
func PulsarSend(data string) error {
var err error
for i := 0; i < 5; i++ {
_, err = producer.Send(context.Background(), &pulsar.ProducerMessage{
id, err := producer.Send(context.Background(), &pulsar.ProducerMessage{
Payload: []byte(data),
})
if err == nil {
Log.Info("send ", zap.Any("id", id))
break
}
closeClient()