apache / apache/rocketmq-client-go
[rpc] Receive reply message with empty body
- Dominant language
- Go
- Stars
- 1.4k
- Forks
- 445
- PR merge metrics
- No merged PRs in 30d
Description
**BUG REPORT**
1. Please describe the issue you observed:
- consumer send reply message (eg: "This's my answer") with RPC mode.
- producer shoud get response message which body is "This's my answer" .
- producer received reply message with empty body.
2. Please tell us about your environment:
- mac 、centos、ubuntu
- client V2.1.1
- RocketMQ V4.9.2
3. Other information (e.g. detailed explanation, logs, related issues, suggestions on how to fix, etc):
**FEATURE REQUEST**
1. The replyContent should be assigned to the Body field of the return value replyMessage in the function CreateReplyMessage,but it's not.
https://github.com/apache/rocketmq-client-go/blob/ffd724165ee59b9108191b8fee72ec78f8535214/examples/consumer/rpc/main.go#L73
```
replyContent := []byte("reply message contents.")
replyMessage, err := consumer.CreateReplyMessage(msg, replyContent)
if err != nil {
fmt.Printf("create reply message err:%v\n", err)
continue
}
```
2. or, assign the replyContent to the Body field of replyMessage after call function CreateReplyMessage in manual before send out,like this:
replyMessage, err := consumer.CreateReplyMessage(msg, replyContent)
...
replyMessage.Body=replyContent
...
// send out
Contributor guide
Assessment
This issue has not been assessed yet.