pulsar-client-go icon indicating copy to clipboard operation
pulsar-client-go copied to clipboard

[issue 816] fix returning err is always nil when using option ackWith…

Open ChItZZZ opened this issue 3 years ago • 2 comments

Contribution Checklist

Master issue: issue 816

Motivation

support consumer to send ack request and get response synchronously

Modifications

  1. add closeCh waiting after send ackRequest
  2. 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)

ChItZZZ avatar Jul 29 '22 14:07 ChItZZZ

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()

zzzming avatar Jul 29 '22 21:07 zzzming

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.

ChItZZZ avatar Jul 30 '22 00:07 ChItZZZ