apache / rocketmq-client-go

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

fix: fix producer send msg timeout option does not take effect #1109

Closed twz915 closed 8 months ago

twz915 commented 8 months ago

What is the purpose of the change

fix https://github.com/apache/rocketmq-client-go/issues/1110 producer send msg timeout option does not take effect

rocketmq.NewProducer(
    producer.WithSendMsgTimeout(time.Second*3),
    producer.WithRetry(2),
)

In most cases, a fixed timeout of 3 seconds is written into the code, preventing the configuration from taking effect.

How to reproduce it?

add producer option producer.WithSendMsgTimeout(time.Microsecond*1) and send message, no err return. (io timeout expected)