This commit is contained in:
wangchuxiao
2023-05-10 20:27:39 +08:00
parent 042d4ca670
commit 150089c2b9
11 changed files with 26 additions and 41 deletions
-2
View File
@@ -4,7 +4,6 @@ import (
"context"
"errors"
"strconv"
"strings"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
@@ -93,7 +92,6 @@ func (p *Producer) SendMessage(ctx context.Context, key string, m proto.Message)
for i, header := range header {
arr = append(arr, strconv.Itoa(i), string(header.Key), string(header.Value))
}
log.ZInfo(ctx, "producer.kafka.GetContextWithMQHeader", "len", len(header), "header", strings.Join(arr, ", "))
kMsg.Headers = header
partition, offset, err := p.producer.SendMessage(kMsg)
log.ZDebug(ctx, "ByteEncoder SendMessage end", "key ", kMsg.Key, "key length", kMsg.Value.Length())