Skip to content

Commit

Permalink
Address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
nodece committed Nov 15, 2024
1 parent 9904d77 commit 835ad66
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pulsar/consumer_partition.go
Original file line number Diff line number Diff line change
Expand Up @@ -623,12 +623,9 @@ func (pc *partitionConsumer) getLastMessageID() (*trackingMessageID, error) {
return req.msgID, req.err
}

opFn := func() (*trackingMessageID, error) {
return request()
}
ctx, cancel := context.WithTimeout(context.Background(), pc.client.operationTimeout)
defer cancel()
res, err := internal.Retry(ctx, opFn, func(err error) time.Duration {
res, err := internal.Retry(ctx, request, func(err error) time.Duration {
nextDelay := bo.Next()
pc.log.WithError(err).Errorf("Failed to get last message id from broker, retrying in %v...", nextDelay)
return nextDelay
Expand Down

0 comments on commit 835ad66

Please sign in to comment.