This commit is contained in:
wangchuxiao
2023-03-08 16:35:18 +08:00
parent ff6a503f53
commit ca1cdbdeb7
10 changed files with 305 additions and 98 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ func NewKafkaProducer(addr []string, topic string) *Producer {
return &p
}
func (p *Producer) SendMessage(ctx context.Context, m proto.Message, key string) (int32, int64, error) {
func (p *Producer) SendMessage(ctx context.Context, key string, m proto.Message) (int32, int64, error) {
operationID := tracelog.GetOperationID(ctx)
log.Info(operationID, "SendMessage", "key ", key, m.String(), p.producer)
kMsg := &sarama.ProducerMessage{}