apache / rocketmq-client-go

Apache RocketMQ go client

Home Page:https://rocketmq.apache.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

It will stop to retry when use SyncSend to send in some case

cserwen opened this issue · comments

BUG REPORT

Currently in SyncSend, retries are only worked when there is a network error, but not for common errors such as Broker busy

res, _err := p.client.InvokeSync(ctx, addr, p.buildSendRequest(mq, msg), 3*time.Second)
if _err != nil {
	err = _err
	continue
}

return p.client.ProcessSendResponse(mq.BrokerName, res, resp, msg)

In java SDK, It will retry for broker_busyservicce not available and so on. And It will select a different broker to retry.

This is very helpful in a multi-Broker cluster, so I think it is necessary to fix this problem.