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