This is an automated email from the ASF dual-hosted git repository. rxl pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/pulsar-client-go.git
The following commit(s) were added to refs/heads/master by this push: new 48b7d01 Fix nack backoff policy logic (#974) 48b7d01 is described below commit 48b7d0195327a81f638a3c51df2010d7eb244bbe Author: xiaolong ran <xiaolong...@tencent.com> AuthorDate: Fri Mar 3 11:54:38 2023 +0800 Fix nack backoff policy logic (#974) Signed-off-by: xiaolongran <xiaolong...@tencent.com> Motivation Currently, the NackBackoffPolicy does not take effect, because in NackBackoffPolicy, we need to use Msg object for Nack, and MsgId cannot be used for Nack, otherwise the Msg redeliverCount field cannot be obtained for backoff retry. --- pulsar/consumer_impl.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pulsar/consumer_impl.go b/pulsar/consumer_impl.go index d16f719..7a86574 100644 --- a/pulsar/consumer_impl.go +++ b/pulsar/consumer_impl.go @@ -587,7 +587,7 @@ func (c *consumer) Nack(msg Message) { } if mid.consumer != nil { - mid.consumer.NackID(msg.ID()) + mid.NackByMsg(msg) return } c.consumers[mid.partitionIdx].NackMsg(msg)