pulsar-client-go
pulsar-client-go copied to clipboard
[BUG] Reconnection logic and Backoff policy doesn't work correctly
I found that there are some issues with the BackoffPolicy:
- We should use a new backoff instance for each use: https://github.com/apache/pulsar-client-go/blob/35ae05157b702804037446e1190a8f4e7557fdbf/pulsar/consumer_partition.go#L1656
- In the reconnection logic, the checking for
IsMaxBackoffReacheddoesn't respect the pc.options.backoffPolicy. https://github.com/apache/pulsar-client-go/blob/35ae05157b702804037446e1190a8f4e7557fdbf/pulsar/consumer_partition.go#L1700 Actually, theIsMaxBackoffReachedis incorrect. We should respect the operation timeout and check the whole retired time instead of the backoff delay time. - From the view of API design, we should move the BackoffPolicy out of the
internalpackage.
@RobertIndie Is there any progress on this issue? Maybe I can handle it.
Sure. Thanks. I assigned this to you.