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

improve: use ctx and timer instead sleep

Open nodece opened this issue 1 year ago • 2 comments

Motivation

We are using time.Sleep and for to execute the retry, which cannot be interrupted, this PR will use context and timer to improve this behavior.

The next improvement idea supports passing the context to interrupt the retry, when closing the producer or consumer, we need to do that.

Modifications

  • Add the Retry method to execute the try, and use Retry instead of time.Sleep and for.

nodece avatar Jul 25 '24 05:07 nodece

Let me fix the consumer seek test first.

nodece avatar Jul 31 '24 07:07 nodece

Seek test will be fixed by #1265.

nodece avatar Aug 14 '24 10:08 nodece

@RobertIndie @crossoverJie Could you have a chance to review?

nodece avatar Nov 08 '24 06:11 nodece