This is an automated email from the ASF dual-hosted git repository.
lizhimin pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git
The following commit(s) were added to refs/heads/develop by this push:
new 0548593b30 [ISSUE #8998] No retry is required when the remaining time
reaches zero (#8999)
0548593b30 is described below
commit 0548593b30466e527f0591e757e6efa204ab793d
Author: hqbfz <[email protected]>
AuthorDate: Mon Jan 6 10:23:47 2025 +0800
[ISSUE #8998] No retry is required when the remaining time reaches zero
(#8999)
---
.../src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java
b/client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java
index c462dd1241..7d4b51cfc5 100644
--- a/client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java
+++ b/client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java
@@ -776,7 +776,7 @@ public class MQClientAPIImpl implements
NameServerUpdateCallback, StartAndShutdo
final DefaultMQProducerImpl producer
) {
int tmp = curTimes.incrementAndGet();
- if (needRetry && tmp <= timesTotal) {
+ if (needRetry && tmp <= timesTotal && timeoutMillis > 0) {
String retryBrokerName = brokerName;//by default, it will send to
the same broker
if (topicPublishInfo != null) { //select one message queue
accordingly, in order to determine which broker to send
MessageQueue mqChosen =
producer.selectOneMessageQueue(topicPublishInfo, brokerName, false);