ignorantshr opened a new issue #767:
URL: https://github.com/apache/rocketmq-client-go/issues/767


   **BUG REPORT**  
   1. Please describe the issue you observed:
   
       - What did you do (The steps to reproduce)?
   
   Send messages in bulk:
   
   ```go
   func main() {
        address, err := primitive.NewNamesrvAddr("127.0.0.1:9876")
        if err != nil {
                log.Fatal(err)
        }
        p, err := rocketmq.NewProducer(
                producer.WithNameServer(address),
                producer.WithGroupName("uuid_1"),
                producer.WithRetry(2),
                )
        if err != nil {
                panic(err)
        }
        if err = p.Start(); err != nil {
                panic(err)
        }
        defer p.Shutdown()
   
        msg1 := primitive.NewMessage("hello", []byte("hi, I'm p with tag 
<test>!"))
        msg1.WithTag("test")
        msg2 := primitive.NewMessage("hello", []byte("hi, I'm p with tag 
<tset>!"))
        msg2.WithTag("tset")
        var msgs []*primitive.Message
        msgs = append(msgs, msg1)
        msgs = append(msgs, msg2)
   
        result, err := p.SendSync(context.Background(), msgs...)
        // this is ok
        //result, err := p.SendSync(context.Background(), msg2)
        if err != nil {
                fmt.Printf("Failed to send message: %s\n", err)
                return
        }
        fmt.Printf("Result: %s", result)
   }
   ```
   
       - What did you expect to see?
   Sent successfully
   
       - What did you see instead?
   Failed to send message:
   
   ```
   GOROOT=/opt/go #gosetup
   GOPATH=/root/go #gosetup
   /opt/go/bin/go build -o /tmp/GoLand/___go_build_producer producer #gosetup
   /tmp/GoLand/___go_build_producer
   INFO[0000] the topic route info changed                  
changeTo="{\"OrderTopicConf\":\"\",\"queueDatas\":[{\"brokerName\":\"LIDC-Dev4.cs15bcloud.internal\",\"readQueueNums\":4,\"writeQueueNums\":4,\"perm\":6,\"topicSynFlag\":0}],\"brokerDatas\":[{\"cluster\":\"DefaultCluster\",\"brokerName\":\"LIDC-Dev4.cs15bcloud.internal\",\"brokerAddrs\":{\"0\":\"10.221.5.7:10911\"}}]}"
 changedFrom="<nil>" topic=hello
   Failed to send message: java.lang.NumberFormatException: For input string: 
"", 
java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
   INFO[0000] will remove client from clientMap             
clientID=10.221.5.7@1752
   
   Process finished with the exit code 0
   
   ```
   
   2. Please tell us about your environment:
   
        - What is your OS?
   Centos7
        - What is your client version?
   rocketmq-client-go-2.1.0
        - What is your RocketMQ version?
   rocketmq-4.9.2
   3. Other information (e.g. detailed explanation, logs, related issues, 
suggestions on how to fix, etc):
   go1.16.4


-- 
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]


Reply via email to