crossoverJie commented on PR #1197: URL: https://github.com/apache/pulsar-client-go/pull/1197#issuecomment-2219943819
> Package: `internal`->`backoff` > Interface name: `BackoffPolicy`-> `Policy` Update: `BackoffPolicy internal.BackoffPolicy` -> `BackOffPolicyFunc func() backoff.Policy`: 1. Because the Policy is concurrently called in the consumer, it has been modified to obtain a `policy` object each time using the `backoffPolicyFunc` function. https://github.com/apache/pulsar-client-go/blob/1152cfc2e3c2024117ecff93a46d90e7eab0fa15/pulsar/consumer_partition.go#L1709-L1712 https://github.com/apache/pulsar-client-go/blob/1152cfc2e3c2024117ecff93a46d90e7eab0fa15/pulsar/consumer_partition.go#L607-L609 2. A new `Reset` function has been added to the Policy interface, which will be called after a successful reconnection. If a user's custom Policy requires the reuse of the same object, the data can be reset within this `Reset` function. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
