[issue 816] fix returning err is always nil when using option ackWith…
Contribution Checklist
Master issue: issue 816
Motivation
support consumer to send ack request and get response synchronously
Modifications
- add closeCh waiting after send ackRequest
- after get ack response of broker, close closeCh
Verifying this change
- [x] Make sure that the change passes the CI checks.
Does this pull request potentially affect one of the following parts:
If yes was chosen, please highlight the changes
- Dependencies (does it add or upgrade a dependency): (no)
- The public API: (no)
- The schema: (no)
- The default values of configurations: (no)
- The wire protocol: (no)
Documentation
- Does this pull request introduce a new feature? (no)
LGTM
Go consumer should have an async Ack just like Java API. We should add your code to make the current ack synchronous. Let's do another PR to provide AckAsync()
LGTM
Go consumer should have an async Ack just like Java API. We should add your code to make the current ack synchronous. Let's do another PR to provide AckAsync()
So I should make another PR to add AckAsync firstly , and then change Ack to synchronization semantic?
But that will change the Ack synchronization behavior which is not compatible with previous sdk version .
Can We just use AckWithResponse in ConsumerOptions to make it synchronization.