Skip to content

Commit b69ad17

Browse files
authored
[ISSUE apache#2459] Fix the error in best practice doc
1 parent 3cc7f09 commit b69ad17

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/cn/best_practice.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@
4545

4646
Producer的send方法本身支持内部重试,重试逻辑如下:
4747

48-
- 至多重试2次(同步发送为2次,异步发送为0次)
49-
- 如果发送失败,则轮转到下一个Broker。这个方法的总耗时时间不超过sendMsgTimeout设置的值,默认10s。
48+
- 至多重试2次。
49+
- 如果同步模式发送失败,则轮转到下一个Broker,如果异步模式发送失败,则只会在当前Broker进行重试。这个方法的总耗时时间不超过sendMsgTimeout设置的值,默认10s。
5050
- 如果本身向broker发送消息产生超时异常,就不会再重试。
5151

5252
以上策略也是在一定程度上保证了消息可以发送成功。如果业务对消息可靠性要求比较高,建议应用增加相应的重试逻辑:比如调用send同步方法发送失败时,则尝试将消息存储到db,然后由后台线程定时重试,确保消息一定到达Broker。

0 commit comments

Comments
 (0)