From dccdae1306a4695f92f80872851722a4fa6b8f80 Mon Sep 17 00:00:00 2001 From: Ganesh Vanahalli Date: Fri, 25 Oct 2024 09:46:01 +0530 Subject: [PATCH] Attempt to clear from PEL again after successfull deletion of Lower --- pubsub/producer.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pubsub/producer.go b/pubsub/producer.go index dacaeba7d0..722c145a09 100644 --- a/pubsub/producer.go +++ b/pubsub/producer.go @@ -201,8 +201,9 @@ func (p *Producer[Request, Response]) clearMessages(ctx context.Context) time.Du } if _, err := p.client.XDel(ctx, p.redisStream, pelData.Lower).Result(); err != nil { log.Error("error deleting PEL's lower message thats past its TTL", "msgID", pelData.Lower, "err", err) - return 0 + return 5 * p.cfg.CheckResultInterval } + return 0 } } return 5 * p.cfg.CheckResultInterval