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 2020/09/27 13:40:34 UTC

[GitHub] [pulsar-client-go] wuYin opened a new pull request #371: Support ack timeout

wuYin opened a new pull request #371:
URL: https://github.com/apache/pulsar-client-go/pull/371


   # Motivation
   Follow doc [acknowledgement-timeout](https://pulsar.apache.org/docs/en/concepts-messaging/#acknowledgement-timeout) to support ack timeout feature.
   
   ### Modifications
   
   - Add `AckTimeout` to ConsumerOptions.
   - Add `unackedMessageTracker` to track messages which received by user.
   - Add 5 `TestAckTimeout*` test cases.
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   This change added tests and can be verified as follows:
   - `TestAckTimeout*`
       Track ack timeout in single topic consumers, with `Exclusive, Failover, Shared` subscription.
   - `TestAckTimeoutSharedMultiAndRegexTopics` 
       Track ack timeout in multi topics consumers, with `Shared` subscription.
   
   ### Different default behavior:
   - Java Client: if consumer enabled DLQPolicy, added 30s `ackTimeout` by default, see [apache/pulsar #3104](https://github.com/apache/pulsar/pull/3014)
   - Go Client: I think it's no longer necessary to do this, so ignored.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar-client-go] wuYin commented on pull request #371: Support ack timeout

Posted by GitBox <gi...@apache.org>.
wuYin commented on pull request #371:
URL: https://github.com/apache/pulsar-client-go/pull/371#issuecomment-700608951


   Thank you for reply, make sense to me, I'll close this PR.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar-client-go] wuYin closed pull request #371: Support ack timeout

Posted by GitBox <gi...@apache.org>.
wuYin closed pull request #371:
URL: https://github.com/apache/pulsar-client-go/pull/371


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar-client-go] uestczshen commented on pull request #371: Support ack timeout

Posted by GitBox <gi...@apache.org>.
uestczshen commented on pull request #371:
URL: https://github.com/apache/pulsar-client-go/pull/371#issuecomment-723575451


   if network is disconnected, NACK cannot reaches the pulsar server. Then how does NACK  work?  so maybe ack-timeout can work in this situation.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar-client-go] wolfstudy commented on pull request #371: Support ack timeout

Posted by GitBox <gi...@apache.org>.
wolfstudy commented on pull request #371:
URL: https://github.com/apache/pulsar-client-go/pull/371#issuecomment-700598476


   Thanks @wuYin support for this logic, in https://github.com/apache/pulsar-client-go/pull/197, we tried to support this feature, but after discussion, we decided to discard this feature. In many cases, how long the ack timeout is set is a problem, so we recommend users to use nack instead.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org