thousmile opened a new issue, #574: URL: https://github.com/apache/rocketmq-clients/issues/574
### Before Creating the Bug Report - [X] I found a bug, not just asking a question, which should be created in [GitHub Discussions](https://github.com/apache/rocketmq-clients/discussions). - [X] I have searched the [GitHub Issues](https://github.com/apache/rocketmq-clients/issues) and [GitHub Discussions](https://github.com/apache/rocketmq-clients/discussions) of this repository and believe that this is not a duplicate. - [X] I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ. ### Programming Language of the Client Go ### Runtime Platform Environment go version go1.20.6 windows/amd64 ### RocketMQ Version of the Client/Server github.com/apache/rocketmq-clients/golang/v5 v5.0.1-rc.4 ### Run or Compiler Version 1 ### Describe the Bug rocketmq message How to add custom key-value pair attributes ### Steps to Reproduce 1 ### What Did You Expect to See? 1 ### What Did You See Instead? 1 ### Additional Context ```golang package main import ( "encoding/binary" "encoding/json" "fmt" rmq_client "github.com/apache/rocketmq-clients/golang/v5" "testing" ) func TestRocketmqMsg(t *testing.T) { message := rmq_client.Message{ Topic: "hello", Body: []byte("this is a message : "), Tag: nil, } } ``` message How to add custom key-value pair attributes For example: Headers in sarama kafka ``` message := &sarama.ProducerMessage{ Topic: "hello", Value: sarama.StringEncoder("this is a message : "), Headers: []sarama.RecordHeader{ {Key: []byte("tenantId"), Value: []byte("1654qwe")}, {Key: []byte("areaId"), Value: bytes}, }, } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
