apache / rocketmq-client-go

Apache RocketMQ go client
https://rocketmq.apache.org/
Apache License 2.0
1.28k stars 409 forks source link

Panic in SendResult.String() when MessageQueue is nil #1124

Open MaOreoreorui opened 7 months ago

MaOreoreorui commented 7 months ago

BUG REPORT

  1. Please describe the issue you observed:

    • What did you do (The steps to reproduce)? The String() method in SendResult cause a panic when MessageQueue field is nil. This happens beacuse String() method tries to access MessageQueue.String() without checking if MessageQueue is nil.

    • What did you expect to see? The String() method should not panic, even when MessageQueue is nil. Instead, it should return a string that clearly indicates MessageQueue is nil.