You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/04/02 10:34:37 UTC
[GitHub] [pulsar-client-go] wolfstudy opened a new pull request #756: Fix ack timeout cause reconnect
wolfstudy opened a new pull request #756:
URL: https://github.com/apache/pulsar-client-go/pull/756
Signed-off-by: xiaolongran <xi...@tencent.com>
### Motivation
Most of this situation is caused by the timeout of sending the message. When the sending of the message times out, we will try to remove the object from the local pendingQueue, but after a period of time, the broker may push the message back, resulting in the connection reconnect occurs.
![image](https://user-images.githubusercontent.com/20965307/161379243-7720f188-71ef-48de-b13b-0c13d28d1fe7.png)
Follow Java SDK process logic:
```
op = pendingMessages.peek();
if (op == null) {
if (log.isDebugEnabled()) {
log.debug("[{}] [{}] Got ack for timed out msg {} - {}", topic, producerName, sequenceId, highestSequenceId);
}
return;
}
```
When a timeout occurs, we just need to drop the request instead of closing the connection.
### Modifications
- Remove reconnection timeout when sendReceipt timeout.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org